const imgUnion = "https://www.figma.com/api/mcp/asset/18b0ebb9-f207-4d5c-af71-90520ca74885";
const imgLine13Stroke = "https://www.figma.com/api/mcp/asset/77c3dd9f-ce92-4c3c-b4e5-4d383013a720";
function IconMarkStarOn({ className }: { className?: string }) {
return (
);
}
function IconMarkStar({ className }: { className?: string }) {
return (
);
}
type RatingProps = {
className?: string;
theme?: "dark" | "light";
value?: "1" | "2" | "3" | "4" | "5";
};
export default function Rating({ className, theme = "dark", value = "1" }: RatingProps) {
const is1Or2Or3 = ["1", "2", "3"].includes(value);
return (
{["2", "3", "4", "5"].includes(value) && }
{["3", "4", "5"].includes(value) && }
{is1Or2Or3 && (
<>
>
)}
{["1", "2"].includes(value) && }
{["4", "5"].includes(value) && }
{value === "1" && }
{value === "4" && }
{value === "5" && }
);
}SUPER CRITICAL: The generated React+Tailwind code MUST be converted to match the target project's technology stack and styling system.
1. Analyze the target codebase to identify: technology stack, styling approach, component patterns, and design tokens
2. Convert React syntax to the target framework/library
3. Transform all Tailwind classes to the target styling system while preserving exact visual design
4. Follow the project's existing patterns and conventions
DO NOT install any Tailwind as a dependency unless the user instructs you to do so.
Node ids have been added to the code as data attributes, e.g. `data-node-id="1:2"`.Component descriptions: The following components have usage descriptions or documentation links defined in Figma. These descriptions provide important context about the intended usage, best practices, and any constraints for each component. Follow these guidelines when implementing or using these components.
## Rating
**Node ID:** 4935:7294
Rating with 5 stars using TVU design system icons. theme(dark/light) × value(1-5).Images and SVGs will be stored as constants, e.g. const image = 'https://www.figma.com/api/mcp/asset/550e8400-e29b-41d4-a716-446655440000'. These constants will be used in the code as the source for the image, ex:
. Image assets are stored on a remote server for 7 days and can be fetched using the provided URLs until they expire.