fix: theme color error (#1427)

This commit is contained in:
Qi 2023-03-09 16:18:44 +08:00 committed by GitHub
parent 11f6525c0e
commit 33dee8daf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -36,14 +36,14 @@ export const getLightTheme = (
handleColor: '#c7c3d9',
linkColor: '#5438FF',
linkColor2: '#5438FF',
linkVisitedColor: '#ABB8FE',
linkVisitedColor: '#5438FF',
popoverColor: '#4C6275',
inputColor: '#4C6275',
tooltipColor: '#fff',
codeColor: '#77757D',
quoteColor: '#645F82',
placeHolderColor: '#C0BFC1',
selectedColor: 'rgba(84,56,255,0.08)',
selectedColor: 'rgba(84, 56, 255, 0.04)',
borderColor: '#9787FF',
disableColor: '#A9A9AD',
warningColor: '#906616',
@ -208,5 +208,9 @@ export const globalThemeVariables: (
'--affine-paragraph-space': theme.space.paragraph,
'--affine-popover-radius': theme.radius.popover,
'--affine-editor-width': '720px',
'--affine-zoom': '1',
'--affine-scale': 'calc(1 / var(--affine-zoom))',
};
};

View File

@ -1,4 +1,5 @@
import { EditorContainer } from '@blocksuite/editor';
import { CSSProperties } from 'react';
export type Theme = 'light' | 'dark';
export type ThemeMode = Theme | 'auto';
@ -148,6 +149,10 @@ export interface AffineThemeCSSVariables {
'--affine-paragraph-space': AffineTheme['space']['paragraph'];
'--affine-popover-radius': AffineTheme['radius']['popover'];
// use for blocksuite
'--affine-editor-width': CSSProperties['width'];
'--affine-zoom': CSSProperties['zoom'];
'--affine-scale': string;
}
declare module '@emotion/react' {