mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-17 10:28:06 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
25 lines
518 B
Markdown
25 lines
518 B
Markdown
---
|
|
order: 99
|
|
debug: true
|
|
title:
|
|
zh-CN: 图标按钮
|
|
en-US: Icon
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
可以扩展 `controls` 属性用以设置自定义图标。
|
|
|
|
## en-US
|
|
|
|
When you need to use a custom `Icon`, you can set the `Icon` component as the property value of `upIcon` and `downIcon`.
|
|
|
|
```jsx
|
|
import { InputNumber } from 'antd';
|
|
import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
|
|
|
export default () => (
|
|
<InputNumber controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined /> }} />
|
|
);
|
|
```
|