mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
parent
c10fbaed6f
commit
1d1d0bac0d
@ -9,7 +9,7 @@ class Form extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { prefixCls, className } = this.props;
|
||||
const { prefixCls, className, style } = this.props;
|
||||
const formClassName = classNames({
|
||||
[`${prefixCls}-horizontal`]: this.props.horizontal,
|
||||
[`${prefixCls}-inline`]: this.props.inline,
|
||||
@ -17,7 +17,7 @@ class Form extends React.Component {
|
||||
});
|
||||
|
||||
return (
|
||||
<form {...this.props} className={formClassName}>
|
||||
<form {...this.props} className={formClassName} style={style}>
|
||||
{this.props.children}
|
||||
</form>
|
||||
);
|
||||
|
@ -151,6 +151,7 @@ class FormItem extends React.Component {
|
||||
renderFormItem(children) {
|
||||
const props = this.props;
|
||||
const prefixCls = props.prefixCls;
|
||||
const style = props.style;
|
||||
const itemClassName = {
|
||||
[`${prefixCls}-item`]: true,
|
||||
[`${prefixCls}-item-with-help`]: !!this.getHelpMsg(),
|
||||
@ -158,7 +159,7 @@ class FormItem extends React.Component {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={classNames(itemClassName)}>
|
||||
<div className={classNames(itemClassName)} style={style}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user