UNPKG

ontime-components

Version:
37 lines (36 loc) 1.02 kB
import { PureComponent } from 'react'; import { IProps } from '../../libs/interfaces'; import { TFuncClick, TFuncChange, TFuncFocus } from '../../libs/types'; declare type TType = 'checkbox' | 'button'; interface ICheckboxProps extends IProps { type?: TType; label?: string; children?: any; value?: boolean; disabled?: boolean; onClick?: Function; onFocus?: Function; onBlur?: Function; onChange?: Function; } interface ICheckboxDefProps { type: TType; } interface ICheckboxState { value: boolean; isFocused: boolean; } declare class Checkbox extends PureComponent<ICheckboxProps & ICheckboxDefProps, ICheckboxState> { static defaultProps: { type: string; }; readonly state: ICheckboxState; constructor(props: ICheckboxProps & ICheckboxDefProps); onClick: TFuncClick; onFocus: TFuncFocus; onBlur: TFuncFocus; onChange: TFuncChange; value: boolean; render(): JSX.Element; } export { Checkbox, ICheckboxProps, ICheckboxState };