added formWrapper style

This commit is contained in:
srgooglo 2022-05-13 21:35:49 +02:00
parent f42a05c3c6
commit 704500f50a
2 changed files with 26 additions and 16 deletions

View File

@ -16,6 +16,8 @@ import {
} from "antd" } from "antd"
import HeadShake from "react-reveal/HeadShake" import HeadShake from "react-reveal/HeadShake"
import "./index.less"
const allComponents = { const allComponents = {
Input, Input,
Button, Button,
@ -169,8 +171,9 @@ export default class FormGenerator extends React.Component {
renderValidationIcon() { renderValidationIcon() {
if (this.props.renderLoadingIcon && this.state.validating) { if (this.props.renderLoadingIcon && this.state.validating) {
return <Icons.LoadingOutlined spin style={{ marginTop: "7px" }} /> return <Icons.LoadingOutlined spin style={{ margin: 0 }} />
} }
return null return null
} }
@ -376,20 +379,22 @@ export default class FormGenerator extends React.Component {
return null return null
} }
return ( return <div
<div> key={this.props.id}
<Form id={this.props.id}
hideRequiredMark={this.props.hideRequiredMark ?? false} className="formWrapper"
name={this.props.name ?? "new_form"} >
onFinish={(e) => this.handleFinish(e)} <Form
ref={this.ref} hideRequiredMark={this.props.hideRequiredMark ?? false}
{...this.props.formProps} name={this.props.name ?? "new_form"}
> onFinish={(e) => this.handleFinish(e)}
{this.renderItems(this.props.items)} ref={this.ref}
<Form.Item key="result" help={helpStatus} validateStatus={validateStatus} /> {...this.props.formProps}
</Form> >
{this.renderValidationIcon()} {this.renderItems(this.props.items)}
</div> <Form.Item key="result" help={helpStatus} validateStatus={validateStatus} />
) </Form>
{this.renderValidationIcon()}
</div>
} }
} }

View File

@ -0,0 +1,5 @@
.formWrapper {
svg {
margin: 0;
}
}