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 | component?: 'button' | 'a' | React.ReactNode;
|
57 |
|
58 | |
59 |
|
60 |
|
61 | loading?: boolean;
|
62 |
|
63 | |
64 |
|
65 |
|
66 | ghost?: true | false | 'light' | 'dark';
|
67 |
|
68 | |
69 |
|
70 |
|
71 | text?: boolean;
|
72 |
|
73 | |
74 |
|
75 |
|
76 | warning?: boolean;
|
77 |
|
78 | |
79 |
|
80 |
|
81 | disabled?: boolean;
|
82 |
|
83 | |
84 |
|
85 |
|
86 | onClick?: React.MouseEventHandler;
|
87 |
|
88 | |
89 |
|
90 |
|
91 | href?: string;
|
92 |
|
93 | |
94 |
|
95 |
|
96 | target?: string;
|
97 | }
|
98 |
|
99 | export default class Button extends React.Component<ButtonProps, any> {
|
100 | static Group: typeof Group;
|
101 | }
|