import {useTranslation} from 'react-i18next'; import {Star} from 'lucide-react'; import {cn} from '@/lib/utils'; /** * Five star buttons. Clicking the chosen star again sends 0, so the parent decides what that means. * * @param value 0 for no rating * @param labelledBy id of the element that names the group * @param readOnly shows the stars as one image, without buttons */ export default function RatingStars({value, onChange, labelledBy, disabled, readOnly}) { const {t} = useTranslation(); if (readOnly) { return ( {[1, 2, 3, 4, 5].map((n) => ( ))} ); } return (
{[1, 2, 3, 4, 5].map((n) => ( ))}
); }