Skip to content

Commit 50ae500

Browse files
authored
chore: update Affix and Tag type (#2700)
1 parent 203e8c6 commit 50ae500

File tree

3 files changed

+51
-45
lines changed

3 files changed

+51
-45
lines changed

types/affix.d.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,25 @@
55
import { AntdComponent } from './component';
66

77
export declare class Affix extends AntdComponent {
8-
/**
9-
* Pixels to offset from top when calculating position of scroll
10-
* @default 0
11-
* @type number
12-
*/
13-
offsetTop: number;
8+
$props: {
9+
/**
10+
* Pixels to offset from top when calculating position of scroll
11+
* @default 0
12+
* @type number
13+
*/
14+
offsetTop?: number;
1415

15-
/**
16-
* Pixels to offset from bottom when calculating position of scroll
17-
* @type number
18-
*/
19-
offsetBottom: number;
16+
/**
17+
* Pixels to offset from bottom when calculating position of scroll
18+
* @type number
19+
*/
20+
offsetBottom?: number;
2021

21-
/**
22-
* specifies the scrollable area dom node
23-
* @default () => window
24-
* @type Function
25-
*/
26-
target: () => HTMLElement;
22+
/**
23+
* specifies the scrollable area dom node
24+
* @default () => window
25+
* @type Function
26+
*/
27+
target?: () => HTMLElement;
28+
};
2729
}

types/tag/checkable-tag.d.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
import { AntdComponent } from '../component';
66

77
export declare class CheckableTag extends AntdComponent {
8-
/**
9-
* Checked status of Tag
10-
* @default false
11-
* @type boolean
12-
*/
13-
checked: boolean;
8+
$props: {
9+
/**
10+
* Checked status of Tag
11+
* @default false
12+
* @type boolean
13+
*/
14+
checked?: boolean;
15+
};
1416
}

types/tag/tag.d.ts

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,31 @@ import { CheckableTag } from './checkable-tag';
88
export declare class Tag extends AntdComponent {
99
static CheckableTag: typeof CheckableTag;
1010

11-
/**
12-
* Callback executed when close animation is completed
13-
* @type Function
14-
*/
15-
afterClose: () => void;
11+
$props: {
12+
/**
13+
* Callback executed when close animation is completed
14+
* @type Function
15+
*/
16+
afterClose?: () => void;
1617

17-
/**
18-
* Whether the Tag can be closed
19-
* @default false
20-
* @type boolean
21-
*/
22-
closable: boolean;
18+
/**
19+
* Whether the Tag can be closed
20+
* @default false
21+
* @type boolean
22+
*/
23+
closable?: boolean;
2324

24-
/**
25-
* Color of the Tag
26-
* @type string
27-
*/
28-
color: string;
25+
/**
26+
* Color of the Tag
27+
* @type string
28+
*/
29+
color?: string;
2930

30-
/**
31-
* Whether the Tag is closed or not
32-
* @default true
33-
* @type boolean
34-
*/
35-
visible: boolean;
31+
/**
32+
* Whether the Tag is closed or not
33+
* @default true
34+
* @type boolean
35+
*/
36+
visible?: boolean;
37+
};
3638
}

0 commit comments

Comments
 (0)