ant-design/components/rate/demo/charactor.md
偏右 a80d6b7231 upgrade rc-rate to 2.x (#4955)
1. allow custom charactor
2. add className and onHoverChange

close #4870
2017-02-21 14:44:13 +08:00

559 B

order title
4
zh-CN en-US
其他字符 Other Charactor

zh-CN

可以将星星替换为其他字符,比如字母,数字,字体图标甚至中文。

en-US

Replace the default star to other charactor like alphabet, digit, iconfont or even Chinese word.

import { Rate, Icon } from 'antd';

ReactDOM.render(
  <div>
    <Rate charactor={<Icon type="heart" />} allowHalf />
    <br />
    <Rate charactor="A" allowHalf style={{ fontSize: 36 }} />
    <br />
    <Rate charactor="好" allowHalf />
  </div>
, mountNode);