fix(component): add back lottie color hack for dark mode (#5576)

Not sure why but it seems the changes in https://github.com/toeverything/AFFiNE/pull/4953 are lost
This commit is contained in:
Peng Xiao 2024-01-16 08:11:50 +00:00
parent baeb5cc732
commit 238d1ad44e
No known key found for this signature in database
GPG Key ID: 23F23D9E8B3971ED
6 changed files with 22 additions and 23 deletions

View File

@ -1,9 +0,0 @@
import { style } from '@vanilla-extract/css';
export const root = style({
width: '1em',
height: '1em',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
});

View File

@ -2,8 +2,8 @@ import clsx from 'clsx';
import Lottie, { type LottieRef } from 'lottie-react';
import { useEffect, useRef } from 'react';
import * as styles from './collections-icon.css';
import animationData from './collections-icon.json';
import * as styles from './styles.css';
export interface CollectionsIconProps {
closed: boolean; // eg, when collections icon is a "dragged over" state

View File

@ -1,9 +0,0 @@
import { style } from '@vanilla-extract/css';
export const root = style({
width: '1em',
height: '1em',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
});

View File

@ -2,8 +2,8 @@ import clsx from 'clsx';
import Lottie, { type LottieRef } from 'lottie-react';
import { useEffect, useRef } from 'react';
import * as styles from './delete-icon.css';
import animationData from './delete-icon.json';
import * as styles from './styles.css';
export interface DeleteIconProps {
closed: boolean; // eg, when delete icon is a "dragged over" state

View File

@ -0,0 +1,19 @@
import { globalStyle, style } from '@vanilla-extract/css';
export const root = style({
width: '1em',
height: '1em',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
});
const magicColor = `rgb(119,117,125)`;
globalStyle(`${root} path[stroke="${magicColor}"]`, {
stroke: 'currentColor',
});
globalStyle(`${root} path[fill="${magicColor}"]`, {
fill: 'currentColor',
});

View File

@ -294,9 +294,7 @@ export const RootAppSidebar = ({
{t['com.affine.workspaceSubPath.trash']()}
</span>
</RouteMenuLinkItem>
{blockSuiteWorkspace && (
<ImportPage blocksuiteWorkspace={blockSuiteWorkspace} />
)}
<ImportPage blocksuiteWorkspace={blockSuiteWorkspace} />
</SidebarScrollableContainer>
<SidebarContainer>
{environment.isDesktop ? <UpdaterButton /> : <AppDownloadButton />}