import StarFilled from '@ant-design/icons/StarFilled'; import RcRate from 'rc-rate'; import type { RateProps as RcRateProps } from 'rc-rate/lib/Rate'; import * as React from 'react'; import { ConfigContext } from '../config-provider'; import Tooltip from '../tooltip'; export interface RateProps extends RcRateProps { tooltips?: Array; } interface RateNodeProps { index: number; } const Rate = React.forwardRef((props, ref) => { const { prefixCls, tooltips, character = , ...rest } = props; const characterRender = (node: React.ReactElement, { index }: RateNodeProps) => { if (!tooltips) { return node; } return {node}; }; const { getPrefixCls, direction } = React.useContext(ConfigContext); const ratePrefixCls = getPrefixCls('rate', prefixCls); return ( ); }); if (process.env.NODE_ENV !== 'production') { Rate.displayName = 'Rate'; } export default Rate;