Skip to content

Commit 1d8341b

Browse files
committed
chore(types): button
1 parent 50ae500 commit 1d8341b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

types/button/button.d.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

55
import { ButtonGroup } from './button-group';
6+
import { VNodeChild } from 'vue';
67

78
export declare class Button {
89
static Group: typeof ButtonGroup;
@@ -13,61 +14,61 @@ export declare class Button {
1314
* @default 'default'
1415
* @type string
1516
*/
16-
type: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
17+
type?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
1718

1819
/**
1920
* set the original html type of button
2021
* @default 'button'
2122
* @type string
2223
*/
23-
htmlType: 'button' | 'submit' | 'reset' | 'menu';
24+
htmlType?: 'button' | 'submit' | 'reset' | 'menu';
2425

2526
/**
2627
* set the icon of button
2728
* @type string
2829
*/
29-
icon: string;
30+
icon?: VNodeChild | JSX.Element;
3031

3132
/**
3233
* can be set to circle or circle-outline or omitted
3334
* @type string
3435
*/
35-
shape: 'circle' | 'circle-outline';
36+
shape?: 'circle' | 'circle-outline';
3637

3738
/**
3839
* can be set to small large or omitted
3940
* @default 'default'
4041
* @type string
4142
*/
42-
size: 'small' | 'large' | 'default';
43+
size?: 'small' | 'large' | 'default';
4344

4445
/**
4546
* set the loading status of button
4647
* @default false
4748
* @type boolean | { delay: number }
4849
*/
49-
loading: boolean | { delay: number };
50+
loading?: boolean | { delay: number };
5051

5152
/**
5253
* disabled state of button
5354
* @default false
5455
* @type boolean
5556
*/
56-
disabled: boolean;
57+
disabled?: boolean;
5758

5859
/**
5960
* make background transparent and invert text and border colors, added in 2.7
6061
* @default false
6162
* @type boolean
6263
*/
63-
ghost: boolean;
64+
ghost?: boolean;
6465

6566
/**
6667
* option to fit button width to its parent width
6768
* @default false
6869
* @type boolean
6970
*/
70-
block: boolean;
71+
block?: boolean;
7172

7273
onClick?: (e?: Event) => void;
7374
};

0 commit comments

Comments
 (0)