--- import { Icon } from 'astro-icon/components' import { Markdown } from 'astro-remote' import { cn } from '../lib/cn' import InputWrapper from './InputWrapper.astro' import type { MarkdownString } from '../lib/markdown' import type { ComponentProps } from 'astro/types' type Props = Omit< ComponentProps, 'children' | 'inputId' > & { options: { label: string value: string icon?: string iconClass?: string description?: MarkdownString disabled?: boolean noTransitionPersist?: boolean }[] disabled?: boolean selectedValue?: Multiple extends true ? string[] : string cardSize?: 'lg' | 'md' | 'sm' iconSize?: 'md' | 'sm' multiple?: Multiple } const { options, disabled, selectedValue = undefined as string[] | string | undefined, cardSize = 'sm', iconSize = 'sm', class: className, multiple = false as boolean, ...wrapperProps } = Astro.props const hasError = !!wrapperProps.error && wrapperProps.error.length > 0 --- {/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */}
{ options.map((option) => ( )) }