mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: remove mui theme provider (#2055)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useTheme } from '@mui/material';
|
||||
import { useTheme } from 'next-themes';
|
||||
import type { FC } from 'react';
|
||||
|
||||
import { InternalLottie } from '../internal-lottie';
|
||||
@@ -16,8 +16,8 @@ export const AffineLoading: FC<AffineLoadingProps> = ({
|
||||
autoplay = false,
|
||||
autoReverse = false,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const isDark = theme.palette.mode === 'dark';
|
||||
const { theme } = useTheme();
|
||||
const isDark = theme === 'dark';
|
||||
return (
|
||||
<InternalLottie
|
||||
key={isDark ? 'dark' : 'light'}
|
||||
|
||||
@@ -48,7 +48,7 @@ export const StyledCard = styled('div')<{
|
||||
...displayFlex('flex-start', 'flex-start'),
|
||||
marginBottom: '24px',
|
||||
transition: 'background .2s',
|
||||
background: theme.palette.mode === 'light' ? '#FFF' : '#2C2C2C',
|
||||
background: 'var(--affine-background-primary-color)',
|
||||
position: 'relative',
|
||||
':hover': {
|
||||
background: 'var(--affine-hover-color)',
|
||||
|
||||
Reference in New Issue
Block a user