import { MouseEventHandler, RefObject } from "react"; export interface RateProps { numRate: number; activeRate?: number; allowClear?: boolean; /** overwrite the trigger logic clear rate */ triggerClearRate?: TriggerProps; } export interface RateReturn { /** Current rate */ currentRate: number; /** change the rate */ onChangeRate: Function; /** Is the current rate the first rate? */ isFirstRate: boolean; /** Is the current rate the last rate? */ isLastRate: boolean; /** Is the current rate the reset rate? */ isReset: boolean; /** Reset when click again */ clearRate: Function; /** trigger clear rate */ triggerClearRate: TriggerProps; } export interface TriggerProps { ref?: RefObject; onClick?: MouseEventHandler; } /** * useRate() - Build your rate component. */ declare const useRate: (props?: RateProps) => RateReturn; export default useRate;