rsuite
Version:
A suite of react components
32 lines (31 loc) • 1.34 kB
TypeScript
import React from 'react';
import { StyledBoxProps } from '../internals/StyledBox';
import type { Color, FormControlBaseProps, Size } from '../internals/types';
export interface RateProps<T = number> extends Omit<StyledBoxProps, 'name'>, FormControlBaseProps<T> {
/** Whether to allow semi selection */
allowHalf?: boolean;
/** Custom character of rate */
character?: React.ReactNode;
/** The prefix of the component CSS class */
classPrefix?: string;
/** Whether to allow cancel selection */
cleanable?: boolean;
/** A rate can have different sizes */
size?: Size;
/** A rate can have different colors */
color?: Color | React.CSSProperties['color'];
/** Maximum rate */
max?: number;
/** Vertical Rate half */
vertical?: boolean;
/** Render custom character */
renderCharacter?: (value: number, index: number) => React.ReactNode;
/** Callback function when hover state changes */
onChangeActive?: (value: T, event: React.SyntheticEvent) => void;
}
/**
* The `Rate` component is used for rating. It can be used to evaluate the quality of the content.
* @see https://rsuitejs.com/components/rate/
*/
declare const Rate: import("../internals/types").InternalRefForwardingComponent<"ul", RateProps<number>, never> & Record<string, never>;
export default Rate;