import * as React from 'react'; import { StandardProps } from '../../common'; import { InputError } from '../InputError'; import { RadioButtonGroupContextType } from '../../contexts'; import { FormContextProps } from '../../hoc'; export interface RadioButtonChangeEvent { /** * The current selected state of the radio button. */ value: boolean; } export interface RadioButtonProps extends StandardProps { /** * The content of the radio button. */ children?: React.ReactNode; /** * Event emitted once the radio button selection changes. */ onChange?(e: RadioButtonChangeEvent): void; /** * Sets the radio button as disabled. */ disabled?: boolean; /** * Displays the error message below the radio button. */ error?: React.ReactChild; /** * Sets the selected and enters the controlled mode. */ value?: boolean; /** * Sets the initial selected. Does not enter the controlled mode. */ defaultValue?: boolean; /** * Name of the radio button within a radio button group. */ name?: string; /** * List of fields, that need to be revalidated when the field value is changed */ validateWith?: Array; } export interface RadioButtonIntProps extends RadioButtonProps { group?: RadioButtonGroupContextType; } export interface RadioButtonIntState { value: boolean; error?: React.ReactChild; controlled: boolean; } /** * The RadioButton input. */ export declare class RadioButton extends React.PureComponent { render(): JSX.Element; static inner: { readonly RadioButtonInt: typeof RadioButtonInt; }; } export declare class RadioButtonInt extends React.PureComponent { readonly name?: string; constructor(props: RadioButtonIntProps); UNSAFE_componentWillReceiveProps({ value, error }: RadioButtonIntProps): void; componentDidMount(): void; componentWillUnmount(): void; setValue: (value: boolean) => void; private select; private onSelected; private control; render(): JSX.Element; static inner: { readonly PaddedContainer: React.FC & { inner: { readonly StyledContainer: any; }; }; readonly InputError: typeof InputError; readonly RadioButtonContainer: any; readonly FlexContainer: any; readonly RadioButtonCircle: any; readonly SelectMark: any; readonly Label: React.SFC & { inner: { readonly Styledlabel: any; }; }; }; }