/** * @author Hanz * @date 2021/8/4 上午10:21 * @description 按钮 */ import React, { FunctionComponent } from 'react'; import { TooltipProps } from '../Tooltip'; import SplitButton from './SplitButton'; import './index.scss'; export interface ButtonProps extends React.ButtonHTMLAttributes { variant?: 'contained' | 'outlined' | 'text'; /** 设置按钮载入状态 */ loading?: boolean | { delay: number; }; /** * 禁用时提示文字 disabled 为true有效 */ toolTipTitle?: React.ReactNode; /** * tooltip props */ TooltipProps?: Omit; /** * 设置危险按钮 */ danger?: boolean; /** content */ children?: React.ReactNode; /** 禁用 */ disabled?: boolean; /** 大小 */ size?: 'small' | 'medium' | 'large'; /** 后置图标 */ endIcon?: React.ReactNode; /** 前置图标 */ startIcon?: React.ReactNode; /** 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 */ href?: string; /** target */ target?: string; /** 禁用提示 */ disabledTooltip?: TooltipProps; [name: string]: any; } export interface IconButtonProps extends React.ButtonHTMLAttributes { /** 按钮形状 */ variant?: 'contained' | 'outlined' | 'text' | 'activate'; size?: 'small' | 'medium' | 'large'; /** tooltip title */ toolTipTitle?: React.ReactNode; /** 设置按钮载入状态 */ loading?: boolean | { delay: number; }; /** * tooltip props */ TooltipProps?: Omit; /** * 设置危险按钮 */ danger?: boolean; /** 禁用 */ disabled?: boolean; /** content */ children?: React.ReactNode; /** 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 */ href?: string; /** target */ target?: string; /** 禁用提示 */ disabledTooltip?: TooltipProps; [name: string]: any; } declare const InternalButton: FunctionComponent; declare const IconButton: FunctionComponent; type mergedButtonType = typeof InternalButton & { IconButton: typeof IconButton; SplitButton: typeof SplitButton; }; export declare const Button: mergedButtonType; export default Button;