({ value = 4 })
| 2 | import React from "react"; |
| 3 | |
| 4 | const Rating = ({ value = 4 }) => { |
| 5 | |
| 6 | return ( |
| 7 | <div className="flex items-center"> |
| 8 | {Array.from({ length: 5 }, (_, i) => ( |
| 9 | <Star |
| 10 | key={i} |
| 11 | className={`shrink-0 size-4 fill-current ${value > i ? "text-green-400" : "text-gray-300"}`} |
| 12 | /> |
| 13 | ))} |
| 14 | </div> |
| 15 | ); |
| 16 | }; |
| 17 | |
| 18 | export default Rating; |
nothing calls this directly
no outgoing calls
no test coverage detected