added formWrapper style

This commit is contained in:
srgooglo 2022-05-13 21:35:49 +02:00
parent e5a0ce109d
commit 3bfd9b2117
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,8 +379,11 @@ export default class FormGenerator extends React.Component {
return null return null
} }
return ( return <div
<div> key={this.props.id}
id={this.props.id}
className="formWrapper"
>
<Form <Form
hideRequiredMark={this.props.hideRequiredMark ?? false} hideRequiredMark={this.props.hideRequiredMark ?? false}
name={this.props.name ?? "new_form"} name={this.props.name ?? "new_form"}
@ -390,6 +396,5 @@ export default class FormGenerator extends React.Component {
</Form> </Form>
{this.renderValidationIcon()} {this.renderValidationIcon()}
</div> </div>
)
} }
} }

View File

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