UNPKG

dtd

Version:

根据数梦工场视觉规范打造的组件库,感谢react-components和ant design

59 lines (58 loc) 2.02 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import Group from './button-group'; export declare type ButtonType = 'primary' | 'secondary' | 'ghost' | 'dashed' | 'danger'; export declare type ButtonShape = 'circle' | 'circle-outline'; export declare type ButtonSize = 'small' | 'default' | 'large' | 'mini'; export interface ButtonProps { type?: ButtonType; htmlType?: string; icon?: string; shape?: ButtonShape; size?: ButtonSize; onClick?: React.FormEventHandler<any>; onMouseUp?: React.FormEventHandler<any>; onMouseDown?: React.FormEventHandler<any>; onKeyPress?: React.KeyboardEventHandler<any>; onKeyDown?: React.KeyboardEventHandler<any>; tabIndex?: number; loading?: boolean | { delay?: number; }; disabled?: boolean; style?: React.CSSProperties; prefixCls?: string; className?: string; ghost?: boolean; target?: string; href?: string; download?: string; } export default class Button extends React.Component<ButtonProps, any> { static Group: typeof Group; static __ANT_BUTTON: boolean; static defaultProps: { prefixCls: string; loading: boolean; ghost: boolean; }; static propTypes: { type: PropTypes.Requireable<string>; shape: PropTypes.Requireable<string>; size: PropTypes.Requireable<string>; htmlType: PropTypes.Requireable<string>; onClick: PropTypes.Requireable<(...args: any[]) => any>; loading: PropTypes.Requireable<boolean | object>; className: PropTypes.Requireable<string>; icon: PropTypes.Requireable<string>; }; timeout: number; delayTimeout: number; constructor(props: ButtonProps); componentDidMount(): void; componentWillReceiveProps(nextProps: ButtonProps): void; componentWillUnmount(): void; handleClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; isNeedInserted(): boolean; render(): JSX.Element; }