ant-design/components/rate/demo/component-token.tsx
muxin 0ea9c88048
feat: migrate less to token for Rate (#42135)
* feat: rename rate token

* docs: add component-token demo
2023-05-18 13:53:51 +08:00

21 lines
415 B
TypeScript

import { ConfigProvider, Rate } from 'antd';
import React from 'react';
/** Test usage. Do not use in your production. */
export default () => (
<ConfigProvider
theme={{
components: {
Rate: {
starColor: 'blue',
starSize: 40,
starHoverScale: 'scale(2)',
starBg: 'red',
},
},
}}
>
<Rate defaultValue={2.5} />
</ConfigProvider>
);