style: optimization code (#42679)

* style: optimization code

* style: use const replace themestyle init
pull/42680/head
Rin 2 years ago committed by GitHub
parent 4aa3a4e664
commit e6a883c592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,14 +6,9 @@ const Empty: React.FC = () => {
const [, token] = useToken(); const [, token] = useToken();
const bgColor = new TinyColor(token.colorBgBase); const bgColor = new TinyColor(token.colorBgBase);
let themeStyle: React.CSSProperties = {};
// Dark Theme need more dark of this // Dark Theme need more dark of this
if (bgColor.toHsl().l < 0.5) { const themeStyle: React.CSSProperties = bgColor.toHsl().l < 0.5 ? { opacity: 0.65 } : {};
themeStyle = {
opacity: 0.65,
};
}
return ( return (
<svg <svg

Loading…
Cancel
Save