Browse Source
fix: when borderRaidus is a string, the component displays an exception (#4102)
pull/4103/head
Vben
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
packages/effects/hooks/src/use-design-tokens.ts
|
|
@ -56,7 +56,9 @@ export function useAntdDesignTokens() { |
|
|
|
|
|
|
|
|
tokens.colorBgBase = getCssVariableValue('--background'); |
|
|
tokens.colorBgBase = getCssVariableValue('--background'); |
|
|
|
|
|
|
|
|
tokens.borderRadius = getCssVariableValue('--radius', false); |
|
|
const radius = Number.parseFloat(getCssVariableValue('--radius', false)); |
|
|
|
|
|
// 1rem = 16px
|
|
|
|
|
|
tokens.borderRadius = radius * 16; |
|
|
|
|
|
|
|
|
tokens.colorBgLayout = getCssVariableValue('--background-deep'); |
|
|
tokens.colorBgLayout = getCssVariableValue('--background-deep'); |
|
|
tokens.colorBgMask = getCssVariableValue('--overlay'); |
|
|
tokens.colorBgMask = getCssVariableValue('--overlay'); |
|
|
|