mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 22:53:08 +08:00
05b3c65b0f
* feat: notifications * feat: watchers * improvements * handle page move for watchers * make watchers non-blocking * more
70 lines
1.3 KiB
TypeScript
70 lines
1.3 KiB
TypeScript
import {
|
|
createTheme,
|
|
CSSVariablesResolver,
|
|
MantineColorsTuple,
|
|
} from "@mantine/core";
|
|
|
|
const blue: MantineColorsTuple = [
|
|
"#e7f3ff",
|
|
"#d0e4ff",
|
|
"#a1c6fa",
|
|
"#6ea6f6",
|
|
"#458bf2",
|
|
"#2b7af1",
|
|
"#0b60d8",
|
|
"#1b72f2",
|
|
"#0056c1",
|
|
"#004aac",
|
|
];
|
|
|
|
const red: MantineColorsTuple = [
|
|
"#ffebeb",
|
|
"#fad7d7",
|
|
"#eeadad",
|
|
"#e3807f",
|
|
"#da5a59",
|
|
"#d54241",
|
|
"#d43535",
|
|
"#bc2727",
|
|
"#a82022",
|
|
"#93151b",
|
|
];
|
|
|
|
export const theme = createTheme({
|
|
colors: {
|
|
blue,
|
|
red,
|
|
},
|
|
/***
|
|
components: {
|
|
ActionIcon: ActionIcon.extend({
|
|
vars: (_theme, props) => {
|
|
return {
|
|
root: {
|
|
...(props.variant === "subtle" &&
|
|
props.color === "dark" && {
|
|
"--ai-color": "var(--mantine-color-default-color)",
|
|
"--ai-hover": "var(--mantine-color-default-hover)",
|
|
}),
|
|
},
|
|
};
|
|
},
|
|
}),
|
|
},
|
|
***/
|
|
});
|
|
|
|
export const mantineCssResolver: CSSVariablesResolver = (theme) => ({
|
|
variables: {
|
|
"--input-error-size": theme.fontSizes.sm,
|
|
},
|
|
light: {
|
|
"--mantine-color-dark-light-color": "#4e5359",
|
|
"--mantine-color-dark-light-hover": "var(--mantine-color-gray-light-hover)",
|
|
},
|
|
dark: {
|
|
"--mantine-color-dark-light-color": "var(--mantine-color-gray-4)",
|
|
"--mantine-color-dark-light-hover": "var(--mantine-color-default-hover)",
|
|
},
|
|
});
|