/** * @file 按钮组件 */ import { ButtonProps as AntdButtonProps } from 'antd/lib/button'; import React, { CSSProperties, ReactNode, MouseEventHandler } from 'react'; import './styles.less'; export interface ButtonProps { /** * 样式类型 */ type?: 'text' | 'light-text' | 'special' | 'gray' | 'reversed' | 'default' | 'primary' | 'link' | 'dashed' | 'danger' | 'dark'; /** * 按钮大小 */ size?: AntdButtonProps['size'] | 'xs'; /** * 左侧图标 */ icon?: string; /** * 右侧图标 */ iconRight?: string; /** * 标签字重 */ fontWeight?: CSSProperties['fontWeight']; /** * true 则始终显示 loading 状态,false 则始终不显示, * 优先级高于 onClick 传 async function 时带来的 loading 状态 */ loading?: boolean; /** * loading 时的按钮标签 */ loadingText?: ReactNode; /** * 禁用状态 */ disabled?: boolean; onClick?: MouseEventHandler; className?: string; children?: ReactNode; /** * button 形状 */ shape?: AntdButtonProps['shape']; style?: CSSProperties; onMouseEnter?: MouseEventHandler; onMouseLeave?: MouseEventHandler; } export declare const Button: React.ForwardRefExoticComponent>;