import React, { ReactElement, ReactNode, ChangeEvent } from 'react';
import css from '../../utils/css';
import { StyledInput, StyledLabel, StyledText } from './StyledRadio';
import { CommonProps } from '../common';
export interface RadioProps extends CommonProps {
/**
* Whether the radio is checked.
*/
checked?: boolean;
/**
* Whether the radio is disabled.
*/
disabled?: boolean;
/**
* Id of element.
*/
id?: string;
/**
* Name of element, is used to refer to the form data for submission.
*/
name?: string;
/**
* Change event handler. Use `event.target.checked` to see whether the radio will be changed to checked.
*/
onChange?: (e: ChangeEvent) => void;
/**
* Radio text.
*/
text: ReactNode;
/**
* Radio input value.
*/
value: string | number;
}
const Radio = ({
text,
value,
disabled = false,
checked,
onChange,
name,
id,
className,
style,
sx = {},
'data-test-id': dataTestId,
}: RadioProps): ReactElement => (
{text}
);
export default Radio;