vcc-ui
Version:
A React library for building user interfaces at Volvo Cars
29 lines (26 loc) • 932 B
TypeScript
import {
ChangeEventHandler,
ForwardRefExoticComponent,
InputHTMLAttributes,
ReactNode,
RefAttributes,
} from 'react';
export type RadioProps = {
/** Should be the same for all radio buttons belonging to same group. */
name?: string;
/** Renders a label inside the input. */
label: ReactNode;
/** onChange handler. Triggers on every keyboard and generally
* is here where you change the value of the `value` property. */
onChange?: ChangeEventHandler<HTMLInputElement>;
isValid?: boolean;
checked?: boolean;
/** Value of the radio button. */
value?: string;
} & InputHTMLAttributes<HTMLInputElement> &
RefAttributes<HTMLInputElement>;
/**
* @deprecated Use `import { Radio } from '@volvo-cars/react-forms'` instead. See [Radio](https://developer.volvocars.com/design-system/web/?path=/docs/components-forms-radio--docs)
*/
export const Radio: ForwardRefExoticComponent<RadioProps>;
export {};