import { ButtonHTMLType } from 'antd/lib/button/button';
import React, { CSSProperties, ReactNode } from 'react';
import { LinkProps } from 'react-router-dom';
import { ButtonBaseProps } from '@material-ui/core/ButtonBase';
declare type BeforeOnClick = () => (void | Promise | boolean | Promise | never);
export interface ButtonProps extends Omit {
size?: 'lg' | 'md' | 'sm' | 'xs'; /** 按钮尺寸 */
type?: 'default' | 'primary' | 'warn' | 'danger' | 'success'; /** 按钮类型 */
pure?: boolean; /** 是否为纯色背景按钮,主要为type=primary时有效 */
plain?: boolean; /** 是否朴素按钮 */
loading?: boolean; /** 是否加载中 */
block?: boolean; /** 将按钮宽度调整为其父宽度的选项 */
link?: boolean; /** 是否链接,去除默认padding,高及行高为字体大小的1.5倍 */
icon?: ReactNode; /** icon图标 */
target?: string; /** 相当于 a 链接的 target 属性,href 存在时生效 */
rel?: string; /** a标签里面的 rel属性 rel="noreferrer" target为_blank 默认添加该属性 */
href?: string; /** 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 */
htmlType?: ButtonHTMLType; /** 设置 button 原生的 type 值,可选值请参考 HTML 标准 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type */
beforeOnClick?: BeforeOnClick | BeforeOnClick[]; /** 单击前执行的操作 逻辑,必须resolve全部返回true才会执行onClick */
onClick?: (event: React.MouseEvent) => any; /** 点击按钮时的回调 */
to?: LinkProps['to']; /** 使用 react-router 跳转 */
style?: CSSProperties; /** style内联样式 */
eventType?: 'info' | 'warn' | 'error' | 'event'; /** 日志上报类型 */
eventValue?: any; /** 日志上报的内容 */
scKey?: string; /** 神策上报 KEY */
scValue?: object; /** 神策上报 value */
}
export declare const Button: ({ className, children, size, type, pure, plain, disabled, loading, block, link, icon, target, rel, href, htmlType, beforeOnClick, onClick, to, style, eventType, eventValue, scKey, scValue, ...props }: ButtonProps) => JSX.Element;
export {};