import type { ChangeEventHandler, ReactNode } from 'react' export interface RadioProps { id: string htmlFor: T title: string subtitle: string checked: boolean onChange: ChangeEventHandler | undefined selectSingle?: boolean children?: ReactNode } export const Radio = (props: RadioProps) => { const { id, htmlFor, title, subtitle, checked, onChange, children, selectSingle = false } = props return (
{/* radio element */}
{/* radio description */} {/* children if checked */} {checked ? children : null}
) }