UNPKG

zent

Version:

一套前端设计语言和基于React的实现

28 lines (27 loc) 1.15 kB
/// <reference types="react" /> import { IconType } from '../icon'; export interface IButtonDirectiveChildProps { className?: string; disabled?: boolean; children?: React.ReactNode; 'data-zv'?: string; onClick?: React.MouseEventHandler; } export declare type IButtonSize = 'medium' | 'large' | 'small'; export declare type IButtonType = 'default' | 'primary' | 'secondary' | 'danger' | 'warning' | 'error' | 'success' | 'text' | 'icon'; export declare type IButtonHtmlType = 'button' | 'submit' | 'reset'; export interface IButtonDirectiveProps<ChildProps extends Omit<IButtonDirectiveChildProps, 'children'>> { size?: IButtonSize; type?: IButtonType; disabled?: boolean; loading?: boolean; outline?: boolean; bordered?: boolean; style?: React.CSSProperties; icon?: IconType; block?: boolean; children: React.ReactElement<ChildProps>; onMouseEnter?: React.MouseEventHandler<HTMLElement>; onMouseLeave?: React.MouseEventHandler<HTMLElement>; } export declare function ButtonDirective<ChildProps extends IButtonDirectiveChildProps>(props: IButtonDirectiveProps<ChildProps>): JSX.Element;