ontime-components
Version:
List of react components
36 lines (35 loc) • 1.04 kB
TypeScript
import { PureComponent } from 'react';
import { IProps, IState } from '../../libs/interfaces';
import { TFuncClick, TFuncChange, TFuncFocus } from '../../libs/types';
interface IRadioProps extends IProps {
label?: string;
children?: any;
value?: boolean;
disabled?: boolean;
onClick?: Function;
onFocus?: Function;
onBlur?: Function;
onChange?: Function;
}
interface IRadioDefProps {
value: boolean;
}
interface IRadioState extends IState {
value: boolean;
isFocused: boolean;
}
declare class Radio extends PureComponent<IRadioProps & IRadioDefProps, IRadioState> {
static defaultProps: IRadioDefProps;
readonly state: IRadioState;
static getDerivedStateFromProps(nextProps: any, prevState: any): {
value: any;
} | null;
constructor(props: IRadioProps & IRadioDefProps);
onClick: TFuncClick;
onFocus: TFuncFocus;
onBlur: TFuncFocus;
onChange: TFuncChange;
value: boolean;
render(): JSX.Element;
}
export { Radio, IRadioProps, IRadioState };