feat: upgrate to new theme (#2027)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Flrande
2023-04-20 16:31:19 +08:00
committed by GitHub
parent 63f7b2556e
commit 372377dd6b
61 changed files with 624 additions and 1037 deletions

View File

@@ -17,155 +17,3 @@ export * from './ui/table';
export * from './ui/toast';
export * from './ui/tooltip';
export * from './ui/tree-view';
declare module '@mui/material/styles' {
interface Theme {
colors: {
primaryColor: string;
pageBackground: string;
popoverBackground: string;
tooltipBackground: string;
hoverBackground: string;
innerHoverBackground: string;
modalBackground: string;
// Use for the quick search tips background
backgroundTertiaryColor: string;
codeBackground: string;
codeBlockBackground: string;
// Use for blockHub and slide bar background
hubBackground: string;
cardHoverBackground: string;
warningBackground: string;
errorBackground: string;
// Use for the page`s text
textColor: string;
secondaryTextColor: string;
textEmphasisColor: string;
// Use for the editor`s text, because in edgeless mode text is different form other
edgelessTextColor: string;
linkColor: string;
// In dark mode, normal text`s (not bold) color
linkColor2: string;
linkVisitedColor: string;
iconColor: string;
handleColor: string;
tooltipColor: string;
codeColor: string;
quoteColor: string;
placeHolderColor: string;
selectedColor: string;
borderColor: string;
disableColor: string;
warningColor: string;
errorColor: string;
lineNumberColor: string;
};
font: {
title: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h6: string;
base: string;
sm: string; // small
xs: string; // tiny
family: string;
numberFamily: string;
codeFamily: string;
lineHeight: string | number;
};
zIndex: {
modal: number;
popover: number;
};
shadow: {
modal: string;
popover: string;
tooltip: string;
};
space: {
paragraph: string;
};
radius: {
popover: string;
};
}
interface ThemeOptions {
colors: {
primaryColor: string;
pageBackground: string;
popoverBackground: string;
tooltipBackground: string;
hoverBackground: string;
innerHoverBackground: string;
modalBackground: string;
// Use for the quick search tips background
backgroundTertiaryColor: string;
codeBackground: string;
codeBlockBackground: string;
// Use for blockHub and slide bar background
hubBackground: string;
cardHoverBackground: string;
warningBackground: string;
errorBackground: string;
// Use for the page`s text
textColor: string;
secondaryTextColor: string;
textEmphasisColor: string;
// Use for the editor`s text, because in edgeless mode text is different form other
edgelessTextColor: string;
linkColor: string;
// In dark mode, normal text`s (not bold) color
linkColor2: string;
linkVisitedColor: string;
iconColor: string;
handleColor: string;
tooltipColor: string;
codeColor: string;
quoteColor: string;
placeHolderColor: string;
selectedColor: string;
borderColor: string;
disableColor: string;
warningColor: string;
errorColor: string;
lineNumberColor: string;
};
font: {
title: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h6: string;
base: string;
sm: string; // small
xs: string; // tiny
family: string;
numberFamily: string;
codeFamily: string;
lineHeight: string | number;
};
shadow: {
modal: string;
popover: string;
tooltip: string;
};
space: {
paragraph: string;
};
radius: {
popover: string;
};
}
}