ant-design/components/input/demo/size.md

33 lines
720 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
2016-05-25 18:21:27 +08:00
order: 1
title:
zh-CN: 三种大小
en-US: Three sizes of Input
2016-03-31 09:40:55 +08:00
---
2015-10-29 08:41:51 +08:00
## zh-CN
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),高度分别为 `40px`、`32px` 和 `24px`
2015-10-29 08:41:51 +08:00
## en-US
2019-02-06 20:51:46 +08:00
There are three sizes of an Input box: `large` (40px), `default` (32px) and `small` (24px).
2019-05-07 14:57:32 +08:00
```jsx
2016-05-19 14:43:10 +08:00
import { Input } from 'antd';
import { UserOutlined } from '@ant-design/icons';
2015-10-29 08:41:51 +08:00
ReactDOM.render(
<>
<Input size="large" placeholder="large size" prefix={<UserOutlined />} />
<br />
<br />
<Input placeholder="default size" prefix={<UserOutlined />} />
<br />
<br />
<Input size="small" placeholder="small size" prefix={<UserOutlined />} />
</>,
2019-05-07 14:57:32 +08:00
mountNode,
2018-11-28 15:00:03 +08:00
);
2019-05-07 14:57:32 +08:00
```