UNPKG

chowa

Version:

UI component library based on React

49 lines (48 loc) 1.56 kB
/** * @license chowa v1.1.3 * * Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn). * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import * as React from 'react'; import * as PropTypes from 'prop-types'; export interface CheckboxProps { className?: string; style?: React.CSSProperties; tabIndex?: number; label?: React.ReactNode; checked: boolean; disabled?: boolean; indeterminate?: boolean; onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; } export interface CheckboxState { result: boolean; } declare class Checkbox extends React.PureComponent<CheckboxProps, CheckboxState> { static propTypes: { className: PropTypes.Requireable<string>; style: PropTypes.Requireable<object>; tabIndex: PropTypes.Requireable<number>; label: PropTypes.Requireable<PropTypes.ReactNodeLike>; checked: PropTypes.Validator<boolean>; disabled: PropTypes.Requireable<boolean>; indeterminate: PropTypes.Requireable<boolean>; onChange: PropTypes.Requireable<(...args: any[]) => any>; }; static defaultProps: { tabIndex: number; checked: boolean; size: string; disabled: boolean; indeterminate: boolean; }; constructor(props: CheckboxProps); private onChangeHandler; private onKeyDownHandler; componentDidUpdate(preProps: CheckboxProps): void; render(): JSX.Element; } export default Checkbox;