UNPKG

@chepchik/react-rating

Version:

React Rating is a react rating component which supports custom symbols both with inline styles and icon.

15 lines (14 loc) 584 B
import React, { MouseEvent, TouchEvent } from "react"; interface RatingSymbolProps { index: number; inactiveIcon: string | object | React.ReactElement; activeIcon: string | object | React.ReactElement; percent: number; direction: "ltr" | "rtl"; readonly?: boolean; onClick?: (index: number, event: MouseEvent | TouchEvent) => void; onMouseMove?: (index: number, event: MouseEvent | TouchEvent) => void; onTouchEnd?: (index: number, event: TouchEvent) => void; } declare const RatingSymbol: React.FC<RatingSymbolProps>; export default RatingSymbol;