UNPKG

ontime-components

Version:
30 lines (29 loc) 891 B
import { PureComponent } from 'react'; import { IProps } from '../../libs/interfaces'; import { TFuncClick } from '../../libs/types'; declare type TSize = 'large' | 'medium' | 'small' | 'smaller'; declare type TType = 'button' | 'submit'; declare type TKind = 'default' | 'success' | 'danger' | 'warning' | 'ghost' | 'empty'; interface IButtonProps extends IProps { type?: TType; size?: TSize; kind?: TKind; label?: string; leftIcon?: string; rightIcon?: string; primary?: boolean; loading?: boolean; disabled?: boolean; onClick?: Function; } interface IButtonDefProps { type: TType; size: TSize; kind: TKind; } declare class Button extends PureComponent<IButtonProps & IButtonDefProps> { static defaultProps: IButtonDefProps; onClick: TFuncClick; render(): JSX.Element; } export { Button, IButtonProps, TSize, TType, TKind };