import * as React from 'react'; import RcRate from 'rc-rate'; import StarFilled from '@ant-design/icons/StarFilled'; import Tooltip from '../tooltip'; import { ConfigContext } from '../config-provider'; export interface RateProps { prefixCls?: string; count?: number; value?: number; defaultValue?: number; allowHalf?: boolean; allowClear?: boolean; disabled?: boolean; tooltips?: Array; onChange?: (value: number) => void; onHoverChange?: (value: number) => void; character?: React.ReactNode; className?: string; style?: React.CSSProperties; } interface RateNodeProps { index: number; } const Rate = React.forwardRef(({ prefixCls, tooltips, ...props }, ref) => { 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 ( ); }); Rate.displayName = 'Rate'; Rate.defaultProps = { character: , }; export default Rate;