--- import { Icon } from 'astro-icon/components' import InputWrapper from './InputWrapper.astro' import type { ComponentProps } from 'astro/types' const ratings = [1, 2, 3, 4, 5] as const type Props = Omit, 'children' | 'inputId' | 'required'> & { value?: number | null required?: boolean id?: string } const { value, required, id, ...wrapperProps } = Astro.props const actualValue = value !== undefined && value !== null ? Math.round(value) : null const inputId = id ?? Astro.locals.makeId(`input-${wrapperProps.name}`) ---
{ ratings.toSorted().map((rating) => ( )) }