import clsx from 'clsx'; import { useId } from 'react'; import { useRadioListContext } from './RadioListContext'; type Props = Readonly<{ description?: string; disabled?: boolean; label: string; value: T; }>; export default function RadioListItem({ description, disabled = false, label, value, }: Props) { const id = useId(); const descriptionId = useId(); const context = useRadioListContext(); return (
{ context?.onChange?.(value, event); } : undefined } />
{description && (

{description}

)}
); }