1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 |
|
6 | export interface GroupProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
7 | |
8 |
|
9 |
|
10 | size?: string;
|
11 | }
|
12 |
|
13 | export class Group extends React.Component<GroupProps, any> {}
|
14 | interface HTMLAttributesWeak extends React.ButtonHTMLAttributes<HTMLElement> {
|
15 | type?: any;
|
16 | onClick?: any;
|
17 | }
|
18 |
|
19 | export interface ButtonProps extends HTMLAttributesWeak, CommonProps {
|
20 | |
21 |
|
22 |
|
23 | type?: 'primary' | 'secondary' | 'normal';
|
24 |
|
25 | |
26 |
|
27 |
|
28 | size?: 'small' | 'medium' | 'large';
|
29 | |
30 |
|
31 |
|
32 | icons?: { loading?: React.ReactNode };
|
33 | |
34 |
|
35 |
|
36 | iconSize?:
|
37 | | number
|
38 | | 'xxs'
|
39 | | 'xs'
|
40 | | 'small'
|
41 | | 'medium'
|
42 | | 'large'
|
43 | | 'xl'
|
44 | | 'xxl'
|
45 | | 'xxxl'
|
46 | | 'inherit';
|
47 |
|
48 | |
49 |
|
50 |
|
51 | htmlType?: 'submit' | 'reset' | 'button';
|
52 |
|
53 | |
54 |
|
55 |
|
56 |
|
57 | component?: 'button' | 'a' | React.ReactNode | React.ComponentType;
|
58 |
|
59 | |
60 |
|
61 |
|
62 | loading?: boolean;
|
63 |
|
64 | |
65 |
|
66 |
|
67 | ghost?: true | false | 'light' | 'dark';
|
68 |
|
69 | |
70 |
|
71 |
|
72 | text?: boolean;
|
73 |
|
74 | |
75 |
|
76 |
|
77 | warning?: boolean;
|
78 |
|
79 | |
80 |
|
81 |
|
82 | disabled?: boolean;
|
83 |
|
84 | |
85 |
|
86 |
|
87 | onClick?: React.MouseEventHandler;
|
88 |
|
89 | |
90 |
|
91 |
|
92 | href?: string;
|
93 |
|
94 | |
95 |
|
96 |
|
97 | target?: string;
|
98 |
|
99 | |
100 |
|
101 |
|
102 | to?: string;
|
103 | }
|
104 |
|
105 | export default class Button extends React.Component<ButtonProps, any> {
|
106 | static Group: typeof Group;
|
107 | }
|