fix: empty icon color error (#2686)

This commit is contained in:
JimmFly
2023-06-05 18:06:17 +08:00
committed by GitHub
parent efae4cccd6
commit 5807f34935
2 changed files with 15 additions and 137 deletions
+4 -5
View File
@@ -1,7 +1,6 @@
import { useTheme } from 'next-themes';
import type { CSSProperties } from 'react';
import { EmptyDarkSvg, EmptyLightSvg } from './empty-svg';
import { EmptySvg } from './empty-svg';
import { StyledEmptyContainer } from './style';
export type EmptyContentProps = {
containerStyle?: CSSProperties;
@@ -14,11 +13,11 @@ export const Empty = ({
description,
descriptionStyle,
}: EmptyContentProps) => {
const { theme } = useTheme();
const isDark = theme === 'dark';
return (
<StyledEmptyContainer style={containerStyle}>
{isDark ? <EmptyDarkSvg /> : <EmptyLightSvg />}
<div style={{ color: 'var(--affine-black)' }}>
<EmptySvg />
</div>
<p style={{ marginTop: '30px', ...descriptionStyle }}>{description}</p>
</StyledEmptyContainer>
);