import React, { forwardRef } from 'react'; import { type Option } from '../../types'; import { HelperText } from '../helper-text'; import { Label } from '../label'; import { RadioGroup, RadioGroupItem, type RadioGroupProps } from '../radio-group'; export interface RadioGroupFieldProps extends RadioGroupProps { label?: string; helperText?: string; variant?: 'default' | 'destructive'; options?: Option[]; } const RadioGroupField = forwardRef, RadioGroupFieldProps>( ({ label, helperText, variant = 'default', defaultValue, options = [], ...props }, ref) => { return (
{label && } {options.map((item) => (
))}
{helperText && {helperText}}
); } ); RadioGroupField.displayName = 'RadioGroupField'; export { RadioGroupField };