import type { HTMLAttributes, ReactNode, InputHTMLAttributes } from 'react' import React, { forwardRef } from 'react' import Label from '../../atoms/Label' import Radio from '../../atoms/Radio' type EnhancedRadioFieldProps = HTMLAttributes & Pick, 'checked'> export interface RadioFieldProps extends EnhancedRadioFieldProps { /** * ID to find this component in testing tools (e.g.: cypress, testing library, and jest). */ testId?: string /** * ID to identify input and corresponding label. */ id: string /** * The text or component displayed to identify the input radio. */ label: string | ReactNode /** * The value to identify the input radio. */ value?: string /** * Identify radio in the same group. */ name?: string } const RadioField = forwardRef( function RadioField( { testId = 'fs-radio-field', id, label, value, name, ...otherProps }, ref ) { return (
) } ) export default RadioField