mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 23:35:38 +08:00
5932005ce4
* feat: FormItem support layout * feat: doc * feat: test * feat: test * feat: test * feat: test * feat: itemPrefixCls
23 lines
574 B
TypeScript
23 lines
574 B
TypeScript
import React from 'react';
|
|
import { Form, Input } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<Form name="layout-multiple" layout="horizontal" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}>
|
|
<Form.Item label="name" name="name" rules={[{ required: true }]}>
|
|
<Input />
|
|
</Form.Item>
|
|
<Form.Item
|
|
layout="vertical"
|
|
label="loooooooooooooooooooooooooooooooong"
|
|
name="age"
|
|
rules={[{ required: true }]}
|
|
labelCol={{ span: 24 }}
|
|
wrapperCol={{ span: 24 }}
|
|
>
|
|
<Input />
|
|
</Form.Item>
|
|
</Form>
|
|
);
|
|
|
|
export default App;
|