mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added formWrapper style
This commit is contained in:
parent
f42a05c3c6
commit
704500f50a
@ -16,6 +16,8 @@ import {
|
||||
} from "antd"
|
||||
import HeadShake from "react-reveal/HeadShake"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
const allComponents = {
|
||||
Input,
|
||||
Button,
|
||||
@ -169,8 +171,9 @@ export default class FormGenerator extends React.Component {
|
||||
|
||||
renderValidationIcon() {
|
||||
if (this.props.renderLoadingIcon && this.state.validating) {
|
||||
return <Icons.LoadingOutlined spin style={{ marginTop: "7px" }} />
|
||||
return <Icons.LoadingOutlined spin style={{ margin: 0 }} />
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
@ -376,20 +379,22 @@ export default class FormGenerator extends React.Component {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Form
|
||||
hideRequiredMark={this.props.hideRequiredMark ?? false}
|
||||
name={this.props.name ?? "new_form"}
|
||||
onFinish={(e) => this.handleFinish(e)}
|
||||
ref={this.ref}
|
||||
{...this.props.formProps}
|
||||
>
|
||||
{this.renderItems(this.props.items)}
|
||||
<Form.Item key="result" help={helpStatus} validateStatus={validateStatus} />
|
||||
</Form>
|
||||
{this.renderValidationIcon()}
|
||||
</div>
|
||||
)
|
||||
return <div
|
||||
key={this.props.id}
|
||||
id={this.props.id}
|
||||
className="formWrapper"
|
||||
>
|
||||
<Form
|
||||
hideRequiredMark={this.props.hideRequiredMark ?? false}
|
||||
name={this.props.name ?? "new_form"}
|
||||
onFinish={(e) => this.handleFinish(e)}
|
||||
ref={this.ref}
|
||||
{...this.props.formProps}
|
||||
>
|
||||
{this.renderItems(this.props.items)}
|
||||
<Form.Item key="result" help={helpStatus} validateStatus={validateStatus} />
|
||||
</Form>
|
||||
{this.renderValidationIcon()}
|
||||
</div>
|
||||
}
|
||||
}
|
5
packages/app/src/components/formGenerator/index.less
Normal file
5
packages/app/src/components/formGenerator/index.less
Normal file
@ -0,0 +1,5 @@
|
||||
.formWrapper {
|
||||
svg {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user