UNPKG

1.72 kBTypeScriptView Raw
1import * as React from 'react';
2import { PickOptional } from '../../helpers/typeUtils';
3import { OUIAProps } from '../../helpers';
4export interface RadioProps extends Omit<React.HTMLProps<HTMLInputElement>, 'disabled' | 'label' | 'onChange' | 'type'>, OUIAProps {
5 /** Additional classes added to the radio. */
6 className?: string;
7 /** Id of the radio. */
8 id: string;
9 /** Flag to show if the radio label is wrapped on small screen. */
10 isLabelWrapped?: boolean;
11 /** Flag to show if the radio label is shown before the radio button. */
12 isLabelBeforeButton?: boolean;
13 /** Flag to show if the radio is checked. */
14 checked?: boolean;
15 /** Flag to show if the radio is checked. */
16 isChecked?: boolean;
17 /** Flag to show if the radio is disabled. */
18 isDisabled?: boolean;
19 /** Flag to show if the radio selection is valid or invalid. */
20 isValid?: boolean;
21 /** Label text of the radio. */
22 label?: React.ReactNode;
23 /** Name for group of radios */
24 name: string;
25 /** A callback for when the radio selection changes. */
26 onChange?: (checked: boolean, event: React.FormEvent<HTMLInputElement>) => void;
27 /** Aria label for the radio. */
28 'aria-label'?: string;
29 /** Description text of the radio. */
30 description?: React.ReactNode;
31 /** Body of the radio. */
32 body?: React.ReactNode;
33}
34export declare class Radio extends React.Component<RadioProps, {
35 ouiaStateId: string;
36}> {
37 static displayName: string;
38 static defaultProps: PickOptional<RadioProps>;
39 constructor(props: RadioProps);
40 handleChange: (event: React.FormEvent<HTMLInputElement>) => void;
41 render(): JSX.Element;
42}
43//# sourceMappingURL=Radio.d.ts.map
\No newline at end of file