Revert "fix: default cssvarkey only picked when component themeconfig && pare…" (#52515)

This reverts commit 3284536605.
This commit is contained in:
afc163 2025-01-21 16:45:43 +08:00 committed by GitHub
parent f61542417e
commit fd31ca32f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,9 +64,7 @@ export default function useTheme(
prefix: config?.prefixCls, // Same as prefixCls by default
...(typeof parentThemeConfig.cssVar === 'object' ? parentThemeConfig.cssVar : {}),
...(typeof themeConfig.cssVar === 'object' ? themeConfig.cssVar : {}),
key: (typeof themeConfig.cssVar === 'object' && themeConfig.cssVar?.key)
|| (typeof parentThemeConfig.cssVar === 'object' && parentThemeConfig.cssVar?.key)
|| cssVarKey,
key: (typeof themeConfig.cssVar === 'object' && themeConfig.cssVar?.key) || cssVarKey,
};
// Base token