feat: add css virable
This commit is contained in:
@@ -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',
|
||||||
@@ -79,6 +80,7 @@ export const getDarkTheme = (
|
|||||||
editorMode === 'edgeless'
|
editorMode === 'edgeless'
|
||||||
? lightTheme.colors.codeBackground
|
? lightTheme.colors.codeBackground
|
||||||
: '#505662',
|
: '#505662',
|
||||||
|
toolTipBackground: '#1F2021',
|
||||||
|
|
||||||
textColor: '#fff',
|
textColor: '#fff',
|
||||||
edgelessTextColor: '#3A4C5C',
|
edgelessTextColor: '#3A4C5C',
|
||||||
@@ -119,6 +121,7 @@ export const globalThemeVariables: (
|
|||||||
'--affine-popover-background': theme.colors.popoverBackground,
|
'--affine-popover-background': theme.colors.popoverBackground,
|
||||||
'--affine-hover-background': theme.colors.hoverBackground,
|
'--affine-hover-background': theme.colors.hoverBackground,
|
||||||
'--affine-code-background': theme.colors.codeBackground,
|
'--affine-code-background': theme.colors.codeBackground,
|
||||||
|
'--affine-tooltip-background': theme.colors.toolTipBackground,
|
||||||
|
|
||||||
'--affine-text-color': theme.colors.textColor,
|
'--affine-text-color': theme.colors.textColor,
|
||||||
'--affine-edgeless-text-color': theme.colors.edgelessTextColor,
|
'--affine-edgeless-text-color': theme.colors.edgelessTextColor,
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export interface AffineTheme {
|
|||||||
popoverBackground: string;
|
popoverBackground: string;
|
||||||
hoverBackground: string;
|
hoverBackground: string;
|
||||||
codeBackground: string;
|
codeBackground: string;
|
||||||
|
toolTipBackground: string;
|
||||||
|
|
||||||
// Use for the page`s text
|
// Use for the page`s text
|
||||||
textColor: string;
|
textColor: string;
|
||||||
@@ -77,6 +78,7 @@ export interface AffineThemeCSSVariables {
|
|||||||
'--affine-popover-background': AffineTheme['colors']['popoverBackground'];
|
'--affine-popover-background': AffineTheme['colors']['popoverBackground'];
|
||||||
'--affine-hover-background': AffineTheme['colors']['hoverBackground'];
|
'--affine-hover-background': AffineTheme['colors']['hoverBackground'];
|
||||||
'--affine-code-background': AffineTheme['colors']['codeBackground'];
|
'--affine-code-background': AffineTheme['colors']['codeBackground'];
|
||||||
|
'--affine-tooltip-background': AffineTheme['colors']['toolTipBackground'];
|
||||||
|
|
||||||
'--affine-text-color': AffineTheme['colors']['textColor'];
|
'--affine-text-color': AffineTheme['colors']['textColor'];
|
||||||
'--affine-edgeless-text-color': AffineTheme['colors']['edgelessTextColor'];
|
'--affine-edgeless-text-color': AffineTheme['colors']['edgelessTextColor'];
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ const StyledTooltip = styled(StyledPopperContainer)(({ theme }) => {
|
|||||||
return {
|
return {
|
||||||
boxShadow: theme.shadow.tooltip,
|
boxShadow: theme.shadow.tooltip,
|
||||||
padding: '4px 12px',
|
padding: '4px 12px',
|
||||||
backgroundColor:
|
backgroundColor: theme.colors.toolTipBackground,
|
||||||
theme.mode === 'dark'
|
|
||||||
? theme.colors.popoverBackground
|
|
||||||
: theme.colors.primaryColor,
|
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: theme.font.xs,
|
fontSize: theme.font.xs,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user