@@ -50,27 +50,52 @@ type ComponentsConfig = {
50
50
} ;
51
51
52
52
export interface ThemeConfig {
53
+ /**
54
+ * @descCN 用于修改 Design Token。
55
+ * @descEN Modify Design Token.
56
+ */
53
57
token ?: Partial < AliasToken > ;
58
+ /**
59
+ * @descCN 用于修改各个组件的 Component Token 以及覆盖该组件消费的 Alias Token。
60
+ * @descEN Modify Component Token and Alias Token applied to components.
61
+ */
54
62
components ?: ComponentsConfig ;
63
+ /**
64
+ * @descCN 用于修改 Seed Token 到 Map Token 的算法。
65
+ * @descEN Modify the algorithms of theme.
66
+ * @default defaultAlgorithm
67
+ */
55
68
algorithm ?: MappingAlgorithm | MappingAlgorithm [ ] ;
69
+ /**
70
+ * @descCN 是否继承外层 `ConfigProvider` 中配置的主题。
71
+ * @descEN Whether to inherit the theme configured in the outer layer `ConfigProvider`.
72
+ * @default true
73
+ */
56
74
inherit ?: boolean ;
57
75
/**
58
- * @descCN 是否开启 `hashed` 属性。如果你的应用中只存在一个版本的 antd,你可以设置为 `false` 来进一步减小样式体积。默认值为 `ture`。
59
- * @descEN Whether to enable the `hashed` attribute. If there is only one version of antd in your application, you can set `false` to reduce the bundle size. defaults to `true`.
76
+ * @descCN 是否开启 `hashed` 属性。如果你的应用中只存在一个版本的 antd,你可以设置为 `false` 来进一步减小样式体积。
77
+ * @descEN Whether to enable the `hashed` attribute. If there is only one version of antd in your application, you can set `false` to reduce the bundle size.
78
+ * @default true
79
+ * @since 5.12.0
60
80
*/
61
81
hashed ?: boolean ;
62
82
/**
63
- * @descCN 通过 `cssVar` 配置来开启 CSS 变量模式,这个配置会被继承。默认值为 `false`。
64
- * @descEN Enable CSS variable mode through `cssVar` configuration, This configuration will be inherited. defaults to `false`.
83
+ * @descCN 通过 `cssVar` 配置来开启 CSS 变量模式,这个配置会被继承。
84
+ * @descEN Enable CSS variable mode through `cssVar` configuration, This configuration will be inherited.
85
+ * @default false
86
+ * @since 5.12.0
65
87
*/
66
88
cssVar ?:
67
89
| {
68
90
/**
69
- * Prefix for css variable, default to `ant`.
91
+ * @descCN css 变量的前缀
92
+ * @descEN Prefix for css variable.
93
+ * @default ant
70
94
*/
71
95
prefix ?: string ;
72
96
/**
73
- * Unique key for theme, should be set manually < react@18.
97
+ * @descCN 主题的唯一 key,版本低于 react@18 时需要手动设置。
98
+ * @descEN Unique key for theme, should be set manually < react@18.
74
99
*/
75
100
key ?: string ;
76
101
}
@@ -141,7 +166,16 @@ export type SpaceConfig = ComponentStyleConfig & Pick<SpaceProps, 'size' | 'clas
141
166
export type PopupOverflow = 'viewport' | 'scroll' ;
142
167
143
168
export interface WaveConfig {
169
+ /**
170
+ * @descCN 是否开启水波纹效果。如果需要关闭,可以设置为 `false`。
171
+ * @descEN Whether to use wave effect. If it needs to close, set to `false`.
172
+ * @default true
173
+ */
144
174
disabled ?: boolean ;
175
+ /**
176
+ * @descCN 自定义水波纹效果。
177
+ * @descEN Customized wave effect.
178
+ */
145
179
showEffect ?: ShowWaveEffect ;
146
180
}
147
181
@@ -152,6 +186,10 @@ export interface ConfigConsumerProps {
152
186
iconPrefixCls : string ;
153
187
getPrefixCls : ( suffixCls ?: string , customizePrefixCls ?: string ) => string ;
154
188
renderEmpty ?: RenderEmptyHandler ;
189
+ /**
190
+ * @descCN 设置 [Content Security Policy](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CSP) 配置。
191
+ * @descEN Set the [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) config.
192
+ */
155
193
csp ?: CSPConfig ;
156
194
autoInsertSpaceInButton ?: boolean ;
157
195
input ?: InputConfig ;
0 commit comments