1 | import React from 'react';
|
2 | import type { SizeType } from '../config-provider/SizeContext';
|
3 | import Group from './button-group';
|
4 | import type { ButtonHTMLType, ButtonShape, ButtonType } from './buttonHelpers';
|
5 | export type LegacyButtonType = ButtonType | 'danger';
|
6 | export interface BaseButtonProps {
|
7 | type?: ButtonType;
|
8 | icon?: React.ReactNode;
|
9 | shape?: ButtonShape;
|
10 | size?: SizeType;
|
11 | disabled?: boolean;
|
12 | loading?: boolean | {
|
13 | delay?: number;
|
14 | };
|
15 | prefixCls?: string;
|
16 | className?: string;
|
17 | rootClassName?: string;
|
18 | ghost?: boolean;
|
19 | danger?: boolean;
|
20 | block?: boolean;
|
21 | children?: React.ReactNode;
|
22 | [key: `data-${string}`]: string;
|
23 | classNames?: {
|
24 | icon: string;
|
25 | };
|
26 | styles?: {
|
27 | icon: React.CSSProperties;
|
28 | };
|
29 | }
|
30 | type MergedHTMLAttributes = Omit<React.HTMLAttributes<HTMLElement> & React.ButtonHTMLAttributes<HTMLElement> & React.AnchorHTMLAttributes<HTMLElement>, 'type'>;
|
31 | export interface ButtonProps extends BaseButtonProps, MergedHTMLAttributes {
|
32 | href?: string;
|
33 | htmlType?: ButtonHTMLType;
|
34 | }
|
35 | type CompoundedComponent = React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>> & {
|
36 | Group: typeof Group;
|
37 | };
|
38 | declare const Button: CompoundedComponent;
|
39 | export default Button;
|