Skip to content

Commit d463dbc

Browse files
author
刘欢
committed
feat(Collapse configProvider): unified provision of custom prefixCls
1 parent bfde19d commit d463dbc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/config-provider/config-provider.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ type Config = {
4848
}
4949
export const defaultPrefixCls = 'adm'
5050

51+
const getPrefixCls = (suffixCls?: string, customizePrefixCls?: string) => {
52+
if (customizePrefixCls) {
53+
return customizePrefixCls
54+
}
55+
return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls
56+
}
5157
export const defaultConfigRef: {
5258
current: Config
5359
} = {

0 commit comments

Comments
 (0)