Skip to content

Commit b2e9baa

Browse files
committed
fix: update ts
1 parent 2c63715 commit b2e9baa

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

components/config-provider/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const ConfigProvider = {
1919
props: {
2020
getPopupContainer: PropTypes.func,
2121
prefixCls: PropTypes.string,
22-
renderEmpty: PropTypes.any,
23-
csp: PropTypes.any,
22+
renderEmpty: PropTypes.func,
23+
csp: PropTypes.object,
2424
autoInsertSpaceInButton: PropTypes.bool,
2525
},
2626
provide() {

types/config-provider.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import { AntdComponent } from './component';
22

3+
import { Locale } from './locale-provider'
4+
5+
export interface CSPConfig {
6+
nonce?: string;
7+
}
8+
39
export declare class ConfigProvider extends AntdComponent {
410
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
11+
getPrefixCls: (suffixCls: string, customizePrefixCls?: string) => string;
12+
renderEmpty: Function;
13+
csp?: CSPConfig;
14+
autoInsertSpaceInButton?: boolean;
515
}

types/locale-provider.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44

55
import { AntdComponent } from './component';
66

7+
export interface ModalLocale {
8+
okText: string;
9+
cancelText: string;
10+
justOkText: string;
11+
}
12+
export interface Locale {
13+
locale: string;
14+
Pagination?: Object;
15+
DatePicker?: Object;
16+
TimePicker?: Object;
17+
Calendar?: Object;
18+
Table?: Object;
19+
Modal?: ModalLocale;
20+
Popconfirm?: Object;
21+
Transfer?: Object;
22+
Select?: Object;
23+
Upload?: Object;
24+
}
25+
726
export declare class LocaleProvider extends AntdComponent {
827
/**
928
* language package setting, you can find the packages in this path: antd/lib/locale-provider/

0 commit comments

Comments
 (0)