I'm using styled components something like this
const FormItem = styled(Form.Item)`
font-size: 16px;
`;
Using Form Item something like this
<FormItem label="System Pressurized">
{getFieldDecorator('systemPressurized')(
<Select defaultValue="" placeholder="Select Type">
<Option value="Yiminghe">yiminghe</Option>
</Select>,
)}
</FormItem>
I've tried changing font size of AntD but it doesn't seem to workout
Ant Design prefers the system default font family and then also provides a set of alternative font libraries to maintain readability for screens on different platforms and browsers and to make sure it's always user friendly, stable and professional to end user.
wrapperCol: It is used to denote the layout for input controls. onFieldsChange: It is a callback function that is triggered when the field updated. onFinish: It is a callback function that is triggered after submitting the form and verifying data successfully.
Just use Form. Item directly: // antd v3 const Demo = ({ form: { getFieldDecorator } }) => ( <Form> <Form. Item> {getFieldDecorator('username', { rules: [{ required: true }], })(<Input />)} </Form.
There are multiple options to override style element.
label {
font-size:16px;
}
<FormItem label={
<p style={{fontSize:"16px"}}>"System Pressurized"</p>
}>
{getFieldDecorator('systemPressurized')(
<Select defaultValue="" placeholder="Select Type">
<Option value="Yiminghe">yiminghe</Option>
</Select>
)
}
</FormItem>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With