2025-05-07 13:55:15 +05:00

17 lines
361 B
TypeScript

import { Star } from 'lucide-react';
export const Rating = ({ rating }: { rating: number }) => {
return (
<>
{Array(5)
.fill(0)
.map((_, i) => (
<Star
key={i}
className={`h-5 w-5 ${i < Number(rating) ? 'fill-yellow-400 text-yellow-400' : 'text-gray-300'}`}
/>
))}
</>
);
};