Browse Source
style: optimization code (#42679)
* style: optimization code
* style: use const replace themestyle init
pull/42680/head
Rin
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
6 deletions
-
components/empty/empty.tsx
|
|
@ -6,14 +6,9 @@ const Empty: React.FC = () => { |
|
|
|
const [, token] = useToken(); |
|
|
|
|
|
|
|
const bgColor = new TinyColor(token.colorBgBase); |
|
|
|
let themeStyle: React.CSSProperties = {}; |
|
|
|
|
|
|
|
// Dark Theme need more dark of this
|
|
|
|
if (bgColor.toHsl().l < 0.5) { |
|
|
|
themeStyle = { |
|
|
|
opacity: 0.65, |
|
|
|
}; |
|
|
|
} |
|
|
|
const themeStyle: React.CSSProperties = bgColor.toHsl().l < 0.5 ? { opacity: 0.65 } : {}; |
|
|
|
|
|
|
|
return ( |
|
|
|
<svg |
|
|
|