mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-01 14:59:35 +08:00
64b905e9bd
* update icons deps * update all icon ref * fix lint * update snapshot
601 B
601 B
order | title | ||||
---|---|---|---|---|---|
5 |
|
zh-CN
可以将星星替换为其他字符,比如字母,数字,字体图标甚至中文。
en-US
Replace the default star to other character like alphabet, digit, iconfont or even Chinese word.
import { Rate } from 'antd';
import { HeartOutlined } from '@ant-design/icons';
ReactDOM.render(
<div>
<Rate character={<HeartOutlined />} allowHalf />
<br />
<Rate character="A" allowHalf style={{ fontSize: 36 }} />
<br />
<Rate character="好" allowHalf />
</div>,
mountNode,
);