UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

22 lines (21 loc) 1.02 kB
import { type IconProps } from "../Icon"; export type RatingIconsPropsType = { className?: string; max?: 5 | 10; value: number; size?: IconProps["size"] | 48; editable?: boolean; disabled?: boolean; onChange?: (newValue: number) => void; icon?: JSX.Element | JSX.Element[]; }; export type RatingIconPropsType = { icon: JSX.Element; status?: "full" | "half" | "empty"; size?: RatingIconsPropsType["size"]; }; export declare const defaultRatingIcon: import("react/jsx-runtime").JSX.Element; export declare function roundHalf(num: number): number; export declare function computeItemStatus(ratingValue: number, itemValue: number, icon: RatingIconsPropsType["icon"]): RatingIconPropsType["status"]; export declare const RatingIcon: ({ icon, status, size, }: RatingIconPropsType) => import("react/jsx-runtime").JSX.Element; export declare const RatingIcons: ({ className, max, value, size, editable, onChange, icon, }: RatingIconsPropsType) => import("react/jsx-runtime").JSX.Element;