UNPKG

primereact

Version:

PrimeReact is an open source UI library for React featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with Prime

40 lines (35 loc) 1.25 kB
import * as React from 'react'; import TooltipOptions from '../tooltip/tooltipoptions'; import { IconType } from '../utils'; interface RatingChangeTargetOptions { name: string; id: string; value: number | undefined | null; } interface RatingChangeParams { originalEvent: React.SyntheticEvent; value: number | undefined | null; stopPropagation(): void; preventDefault(): void; target: RatingChangeTargetOptions; } export interface RatingProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | 'ref'> { value?: number; disabled?: boolean; readOnly?: boolean; stars?: number; cancel?: boolean; tooltip?: string; tooltipOptions?: TooltipOptions; onChange?(e: RatingChangeParams): void; children?: React.ReactNode; onIcon?: IconType<RatingProps>; offIcon?: IconType<RatingProps>; cancelIcon?: IconType<RatingProps>; cancelIconProps?: React.HTMLAttributes<HTMLSpanElement>; onIconProps?: React.HTMLAttributes<HTMLSpanElement>; offIconProps?: React.HTMLAttributes<HTMLSpanElement>; } export declare class Rating extends React.Component<RatingProps, any> { public getElement(): HTMLDivElement; }