mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat: responsive ui above 640px (#1741)
This commit is contained in:
@@ -27,6 +27,7 @@ declare module '@mui/material/styles' {
|
||||
tooltipBackground: string;
|
||||
hoverBackground: string;
|
||||
innerHoverBackground: string;
|
||||
modalBackground: string;
|
||||
// Use for the quick search tips background
|
||||
backgroundTertiaryColor: string;
|
||||
codeBackground: string;
|
||||
@@ -103,6 +104,7 @@ declare module '@mui/material/styles' {
|
||||
tooltipBackground: string;
|
||||
hoverBackground: string;
|
||||
innerHoverBackground: string;
|
||||
modalBackground: string;
|
||||
// Use for the quick search tips background
|
||||
backgroundTertiaryColor: string;
|
||||
codeBackground: string;
|
||||
|
||||
@@ -29,6 +29,7 @@ export const getLightTheme = (
|
||||
cardHoverBackground: '#f8f9ff',
|
||||
warningBackground: '#FFF9C7',
|
||||
errorBackground: '#FFDED8',
|
||||
modalBackground: 'rgba(0, 0, 0, 0.6)',
|
||||
|
||||
textColor: '#424149',
|
||||
secondaryTextColor: '#8E8D91',
|
||||
@@ -83,6 +84,15 @@ export const getLightTheme = (
|
||||
radius: {
|
||||
popover: '10px',
|
||||
},
|
||||
breakpoints: {
|
||||
values: {
|
||||
xs: 0,
|
||||
sm: 640,
|
||||
md: 960,
|
||||
lg: 1280,
|
||||
xl: 1920,
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -113,6 +123,7 @@ export const getDarkTheme = (
|
||||
cardHoverBackground: '#363636',
|
||||
warningBackground: '#FFF9C7',
|
||||
errorBackground: '#FFDED8',
|
||||
modalBackground: 'rgba(0, 0, 0, 0.8)',
|
||||
|
||||
textColor: '#fff',
|
||||
secondaryTextColor: '#8E8D91',
|
||||
@@ -207,7 +218,6 @@ 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))',
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@ export interface AffineTheme {
|
||||
tooltipBackground: string;
|
||||
hoverBackground: string;
|
||||
innerHoverBackground: string;
|
||||
modalBackground: string;
|
||||
// Use for the quick search tips background
|
||||
backgroundTertiaryColor: string;
|
||||
codeBackground: string;
|
||||
@@ -92,6 +93,15 @@ export interface AffineTheme {
|
||||
radius: {
|
||||
popover: string;
|
||||
};
|
||||
breakpoints: {
|
||||
values: {
|
||||
xs: number;
|
||||
sm: number;
|
||||
md: number;
|
||||
lg: number;
|
||||
xl: number;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface AffineThemeCSSVariables {
|
||||
@@ -150,7 +160,6 @@ export interface AffineThemeCSSVariables {
|
||||
|
||||
'--affine-popover-radius': AffineTheme['radius']['popover'];
|
||||
// use for blocksuite
|
||||
'--affine-editor-width': CSSProperties['width'];
|
||||
'--affine-zoom': CSSProperties['zoom'];
|
||||
'--affine-scale': string;
|
||||
}
|
||||
|
||||
@@ -12,10 +12,7 @@ export const StyledBackdrop = styled('div')(({ theme }) => {
|
||||
bottom: '0',
|
||||
top: '0',
|
||||
left: '0',
|
||||
backgroundColor:
|
||||
theme.palette.mode === 'light'
|
||||
? 'rgba(58, 76, 92, 0.2)'
|
||||
: 'rgba(34, 34, 34, 0.6)',
|
||||
backgroundColor: theme.colors.modalBackground,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user