mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix: remove mui theme provider (#2055)
This commit is contained in:
32
packages/component/src/theme/theme.css.ts
Normal file
32
packages/component/src/theme/theme.css.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { AffineCssVariables } from '@affine/component';
|
||||
import { globalStyle } from '@vanilla-extract/css';
|
||||
import kebabCase from 'kebab-case';
|
||||
|
||||
import { darkTheme, lightTheme } from '../styles/theme';
|
||||
|
||||
globalStyle('body', {
|
||||
color: 'var(--affine-text-primary-color)',
|
||||
fontFamily: 'var(--affine-font-family)',
|
||||
fontSize: 'var(--affine-font-base)',
|
||||
lineHeight: 'var(--affine-font-height)',
|
||||
});
|
||||
|
||||
globalStyle('html', {
|
||||
vars: {
|
||||
...Object.entries(lightTheme).reduce((variables, [key, value]) => {
|
||||
variables[`--affine-${kebabCase(key)}` as keyof AffineCssVariables] =
|
||||
value;
|
||||
return variables;
|
||||
}, {} as AffineCssVariables),
|
||||
},
|
||||
});
|
||||
|
||||
globalStyle('html[data-theme="dark"]', {
|
||||
vars: {
|
||||
...Object.entries(darkTheme).reduce((variables, [key, value]) => {
|
||||
variables[`--affine-${kebabCase(key)}` as keyof AffineCssVariables] =
|
||||
value;
|
||||
return variables;
|
||||
}, {} as AffineCssVariables),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user