chore: update theme

This commit is contained in:
lawvs 2022-10-28 15:12:26 +08:00
parent b06f89b356
commit 24ce511b59
2 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,7 @@ export const getLightTheme = (
pageBackground: '#fff', pageBackground: '#fff',
hoverBackground: '#F1F3FF', hoverBackground: '#F1F3FF',
popoverBackground: '#fff', popoverBackground: '#fff',
tooltipBackground: '#6880FF',
codeBackground: '#f2f5f9', codeBackground: '#f2f5f9',
textColor: '#3A4C5C', textColor: '#3A4C5C',
@ -26,6 +27,7 @@ export const getLightTheme = (
linkColor2: '#6880FF', linkColor2: '#6880FF',
linkVisitedColor: '#ABB8FE', linkVisitedColor: '#ABB8FE',
popoverColor: '#4C6275', popoverColor: '#4C6275',
tooltipColor: '#fff',
codeColor: '#517ea6', codeColor: '#517ea6',
quoteColor: '#4C6275', quoteColor: '#4C6275',
placeHolderColor: '#C7C7C7', placeHolderColor: '#C7C7C7',
@ -75,6 +77,7 @@ export const getDarkTheme = (
pageBackground: '#2c2c2c', pageBackground: '#2c2c2c',
hoverBackground: '#3C3C42', hoverBackground: '#3C3C42',
popoverBackground: '#1F2021', popoverBackground: '#1F2021',
tooltipBackground: '#1F2021',
codeBackground: codeBackground:
editorMode === 'edgeless' editorMode === 'edgeless'
? lightTheme.colors.codeBackground ? lightTheme.colors.codeBackground
@ -87,6 +90,7 @@ export const getDarkTheme = (
linkColor2: '#6880FF', linkColor2: '#6880FF',
linkVisitedColor: '#505FAB', linkVisitedColor: '#505FAB',
popoverColor: '#C6CBD9', popoverColor: '#C6CBD9',
tooltipColor: '#fff',
codeColor: codeColor:
editorMode === 'edgeless' ? lightTheme.colors.codeColor : '#BDDBFD', editorMode === 'edgeless' ? lightTheme.colors.codeColor : '#BDDBFD',
quoteColor: '#C6CBD9', quoteColor: '#C6CBD9',
@ -152,5 +156,9 @@ export const globalThemeVariables: (
'--affine-paragraph-space': theme.space.paragraph, '--affine-paragraph-space': theme.space.paragraph,
'--affine-popover-radius': theme.radius.popover, '--affine-popover-radius': theme.radius.popover,
'--affine-tooltip-color': theme.colors.tooltipColor,
'--affine-tooltip-background': theme.colors.tooltipBackground,
}; };
}; };

View File

@ -21,6 +21,7 @@ export interface AffineTheme {
pageBackground: string; pageBackground: string;
popoverBackground: string; popoverBackground: string;
tooltipBackground: string;
hoverBackground: string; hoverBackground: string;
codeBackground: string; codeBackground: string;
@ -34,6 +35,7 @@ export interface AffineTheme {
linkVisitedColor: string; linkVisitedColor: string;
iconColor: string; iconColor: string;
popoverColor: string; popoverColor: string;
tooltipColor: string;
codeColor: string; codeColor: string;
quoteColor: string; quoteColor: string;
placeHolderColor: string; placeHolderColor: string;
@ -111,6 +113,9 @@ export interface AffineThemeCSSVariables {
'--affine-paragraph-space': AffineTheme['space']['paragraph']; '--affine-paragraph-space': AffineTheme['space']['paragraph'];
'--affine-popover-radius': AffineTheme['radius']['popover']; '--affine-popover-radius': AffineTheme['radius']['popover'];
'--affine-tooltip-color': AffineTheme['colors']['tooltipColor'];
'--affine-tooltip-background': AffineTheme['colors']['tooltipBackground'];
} }
declare module '@emotion/react' { declare module '@emotion/react' {