mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
improve FormItem colon (#2311)
This commit is contained in:
parent
a30f0090b9
commit
497cc1f65a
@ -9,6 +9,7 @@ export default class FormItem extends React.Component {
|
||||
static defaultProps = {
|
||||
hasFeedback: false,
|
||||
prefixCls: 'ant-form',
|
||||
colon: true,
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
@ -197,7 +198,7 @@ export default class FormItem extends React.Component {
|
||||
const itemClassName = {
|
||||
[`${prefixCls}-item`]: true,
|
||||
[`${prefixCls}-item-with-help`]: !!this.getHelpMsg(),
|
||||
[`${prefixCls}-no-colon`]: !this.props.colon,
|
||||
[`${prefixCls}-item-no-colon`]: !props.colon,
|
||||
[`${props.className}`]: !!props.className,
|
||||
};
|
||||
|
||||
|
@ -101,7 +101,7 @@ input[type="checkbox"] {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
&.@{form-prefix-cls}-no-colon > label:after {
|
||||
&-no-colon &-label label:after {
|
||||
content: " ";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user