UNPKG

chowa

Version:

UI component library based on React

65 lines (64 loc) 2.04 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'; import { OmitProps } from '../utils'; export interface ButtonProps extends OmitProps<React.ButtonHTMLAttributes<any>, 'type'> { className?: string; disabled?: boolean; active?: boolean; type?: 'default' | 'primary' | 'danger'; htmlType?: 'button' | 'submit' | 'reset'; loading?: boolean; size?: 'small' | 'default' | 'large'; href?: string; target?: '_blank' | '_self' | '_parent' | '_top'; round?: boolean; block?: boolean; ghost?: boolean; dashed?: boolean; text?: boolean; } declare class Button extends React.PureComponent<ButtonProps, any> { static propTypes: { className: PropTypes.Requireable<string>; disabled: PropTypes.Requireable<boolean>; active: PropTypes.Requireable<boolean>; type: PropTypes.Requireable<string>; htmlType: PropTypes.Requireable<string>; loading: PropTypes.Requireable<boolean>; size: PropTypes.Requireable<string>; href: PropTypes.Requireable<string>; target: PropTypes.Requireable<string>; round: PropTypes.Requireable<boolean>; block: PropTypes.Requireable<boolean>; ghost: PropTypes.Requireable<boolean>; dashed: PropTypes.Requireable<boolean>; text: PropTypes.Requireable<boolean>; }; static defaultProps: { disabled: boolean; active: boolean; type: string; htmlType: string; loading: boolean; size: string; target: string; round: boolean; block: boolean; ghost: boolean; dashed: boolean; text: boolean; }; private btnEle; focus(): void; blur(): void; render(): JSX.Element; } export default Button;