fix: Desc label with flex node (#27375)

* fix: Desc label with flex node

* test: Update snapshot

* rm useless css

* more style

* rm useless code
This commit is contained in:
二货机器人 2020-10-26 18:40:26 +08:00 committed by GitHub
parent 88414b3b33
commit 59a133274b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View File

@ -861,7 +861,11 @@ exports[`renders ./components/descriptions/demo/text.md correctly 1`] = `
<span
class="ant-descriptions-item-label"
>
Billing Mode
<div
style="display:flex"
>
Billing Mode
</div>
</span>
<span
class="ant-descriptions-item-content"

View File

@ -52,7 +52,9 @@ const columns = [
ReactDOM.render(
<Descriptions title="User Info" column={2}>
<Descriptions.Item label="Product">Cloud Database</Descriptions.Item>
<Descriptions.Item label="Billing Mode">Prepaid</Descriptions.Item>
<Descriptions.Item label={<div style={{ display: 'flex' }}>Billing Mode</div>}>
Prepaid
</Descriptions.Item>
<Descriptions.Item label="Automatic Renewal">YES</Descriptions.Item>
<Descriptions.Item label="Order time">2018-04-24 18:00:00</Descriptions.Item>
<Descriptions.Item label="Usage Time" span={2}>

View File

@ -93,13 +93,15 @@
&-item {
padding-bottom: 0;
vertical-align: top;
> span {
display: inline-flex;
align-items: baseline;
}
&-container {
display: flex;
.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
display: inline-flex;
align-items: baseline;
}
}
}