MCPcopy Create free account
hub / github.com/GreatStackDev/gocart / Rating

Function Rating

components/Rating.jsx:4–16  ·  view source on GitHub ↗
({ value = 4 })

Source from the content-addressed store, hash-verified

2import React from "react";
3
4const 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
18export default Rating;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected