|
|
@ -3,15 +3,15 @@ import classNames from 'classnames';
|
|
|
|
|
|
|
|
|
|
|
|
class Form extends React.Component {
|
|
|
|
class Form extends React.Component {
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const prefixCls = this.props.prefixCls;
|
|
|
|
const { prefixCls, className } = this.props;
|
|
|
|
const formClassName = {
|
|
|
|
const formClassName = classNames({
|
|
|
|
|
|
|
|
[className]: !!className,
|
|
|
|
[`${prefixCls}-horizontal`]: this.props.horizontal,
|
|
|
|
[`${prefixCls}-horizontal`]: this.props.horizontal,
|
|
|
|
[`${prefixCls}-inline`]: this.props.inline,
|
|
|
|
[`${prefixCls}-inline`]: this.props.inline,
|
|
|
|
};
|
|
|
|
});
|
|
|
|
const classes = classNames(formClassName);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<form {...this.props} className={classes}>
|
|
|
|
<form {...this.props} className={formClassName}>
|
|
|
|
{this.props.children}
|
|
|
|
{this.props.children}
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
);
|
|
|
|
);
|
|
|
|