mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-13 15:49:10 +08:00
8026366676
* feat: add inlineMargin token support form inline layout * fix * fix --------- Co-authored-by: afc163 <afc163@gmail.com>
49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { ConfigProvider, Form, Input } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<ConfigProvider
|
|
theme={{
|
|
components: {
|
|
Form: {
|
|
labelRequiredMarkColor: 'pink',
|
|
labelColor: 'green',
|
|
labelFontSize: 16,
|
|
labelHeight: 34,
|
|
labelColonMarginInlineStart: 4,
|
|
labelColonMarginInlineEnd: 12,
|
|
itemMarginBottom: 18,
|
|
inlineItemMarginBottom: 18,
|
|
},
|
|
},
|
|
}}
|
|
>
|
|
<Form
|
|
name="basic"
|
|
labelCol={{ span: 8 }}
|
|
wrapperCol={{ span: 16 }}
|
|
style={{ maxWidth: 600 }}
|
|
initialValues={{ remember: true }}
|
|
autoComplete="off"
|
|
>
|
|
<Form.Item
|
|
label="Username"
|
|
name="username"
|
|
rules={[{ required: true, message: 'Please input your username!' }]}
|
|
>
|
|
<Input />
|
|
</Form.Item>
|
|
|
|
<Form.Item
|
|
label="Password"
|
|
name="password"
|
|
rules={[{ required: true, message: 'Please input your password!' }]}
|
|
>
|
|
<Input.Password />
|
|
</Form.Item>
|
|
</Form>
|
|
</ConfigProvider>
|
|
);
|
|
|
|
export default App;
|