From 7a754d9544497a9123b53515f50b3f12730b1cfe Mon Sep 17 00:00:00 2001 From: imoctopus Date: Wed, 18 May 2022 20:02:24 +0800 Subject: [PATCH] feat: update Rate character type --- components/rate/index.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/components/rate/index.tsx b/components/rate/index.tsx index f02267721987..3e94b5d2189c 100644 --- a/components/rate/index.tsx +++ b/components/rate/index.tsx @@ -1,25 +1,13 @@ import * as React from 'react'; import RcRate from 'rc-rate'; import StarFilled from '@ant-design/icons/StarFilled'; -import type { StarProps } from 'rc-rate/lib/Star'; +import type { RateProps as RcRateProps } from 'rc-rate/lib/Rate'; 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; +export interface RateProps extends RcRateProps { tooltips?: Array; - onChange?: (value: number) => void; - onHoverChange?: (value: number) => void; - character?: StarProps['character']; - className?: string; - style?: React.CSSProperties; } interface RateNodeProps {