import { RatingGroup } from '@chakra-ui/react'; import * as React from 'react'; export interface RatingProps extends RatingGroup.RootProps { icon?: React.ReactElement; count?: number; label?: React.ReactNode; } export const Rating = React.forwardRef(function Rating(props, ref) { const { icon, count = 5, label, ...rest } = props; return ( {label && {label}} {Array.from({ length: count }).map((_, index) => ( ))} ); });