/** * * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc.. * * This source code is licensed under the Apache license. * See LICENSE file in the project root for license information. * */ import * as React from 'react'; import Group from './button-group'; import { Omit } from '../../_util/type'; import { SizeType } from '../../config-provider/component/SizeContext'; declare const ButtonTypes: ["default", "primary", "ghost", "dashed", "link", "text", "secondary", "tertiary"]; export declare type ButtonType = typeof ButtonTypes[number]; declare const ButtonShapes: ["circle", "round"]; export declare type ButtonShape = typeof ButtonShapes[number]; declare const ButtonHTMLTypes: ["submit", "button", "reset"]; export declare type ButtonHTMLType = typeof ButtonHTMLTypes[number]; export declare type LegacyButtonType = ButtonType | 'danger'; export declare function convertLegacyProps(type?: LegacyButtonType): ButtonProps; export interface BaseButtonProps { type?: ButtonType; icon?: React.ReactNode; shape?: ButtonShape; size?: SizeType | 'mini'; loading?: boolean | { delay?: number; }; prefixCls?: string; className?: string; ghost?: boolean; danger?: boolean; block?: boolean; children?: React.ReactNode; } export declare type AnchorButtonProps = { href: string; target?: string; onClick?: React.MouseEventHandler; } & BaseButtonProps & Omit, 'type' | 'onClick'>; export declare type NativeButtonProps = { htmlType?: ButtonHTMLType; onClick?: React.MouseEventHandler; } & BaseButtonProps & Omit, 'type' | 'onClick'>; export declare type ButtonProps = Partial; interface CompoundedComponent extends React.ForwardRefExoticComponent> { Group: typeof Group; __ANT_BUTTON: boolean; } declare const Button: CompoundedComponent; export default Button;