"use client"; import type { ComponentRenderProps } from "./types"; import { baseClass, getCustomClass } from "./utils"; export function Rating({ element }: ComponentRenderProps) { const { props } = element; const customClass = getCustomClass(props); const ratingValue = (props.value as number) || 0; const maxRating = (props.max as number) || 5; return (
{props.label ? (
{props.label as string}
) : null}
{Array.from({ length: maxRating }).map((_, i) => ( * ))}
); }