import * as RadioGroupPrimitive from '@radix-ui/react-radio-group' import clsx from 'clsx' import type { ComponentProps, ElementRef, ReactNode, Ref } from 'react' import { Check } from '../../icons' import styles from './RadioGroup.module.css' // Root export const RadioGroup = ({ className, ref, ...props }: ComponentProps & { ref?: Ref> }) => { return ( ) } RadioGroup.displayName = 'RadioGroup' // Item type RadioGroupItemProps = ComponentProps & { label?: ReactNode ref?: Ref> } export const RadioGroupItem = ({ className, label, id, ref, ...props }: RadioGroupItemProps) => { const itemId = id ?? props.value return (
{label && ( )}
) } RadioGroupItem.displayName = 'RadioGroupItem'