2024-09-15 14:52:03 +00:00
|
|
|
const lightTheme = require("daisyui/src/theming/themes")["light"];
|
|
|
|
const darkTheme = require("daisyui/src/theming/themes")["dark"];
|
2023-09-27 08:00:26 +00:00
|
|
|
|
2024-09-15 14:52:03 +00:00
|
|
|
function excludeThemeColor(
|
|
|
|
theme: { [key: string]: string },
|
|
|
|
exclude: string[]
|
|
|
|
): { [key: string]: string } {
|
2023-09-27 08:00:26 +00:00
|
|
|
/** @type {typeof theme} */
|
2024-09-15 14:52:03 +00:00
|
|
|
const newObj: { [key: string]: string } = {};
|
2023-09-27 08:00:26 +00:00
|
|
|
for (const key in theme) {
|
|
|
|
if (exclude.includes(key)) continue;
|
2024-09-15 14:52:03 +00:00
|
|
|
newObj[key] = theme[key]!;
|
2023-09-27 08:00:26 +00:00
|
|
|
}
|
|
|
|
return newObj;
|
|
|
|
}
|
|
|
|
|
2024-09-15 14:52:03 +00:00
|
|
|
export default {
|
2024-04-08 12:22:29 +00:00
|
|
|
darkMode: ["class", '[data-theme="dark"]'],
|
2023-09-27 08:00:26 +00:00
|
|
|
daisyui: {
|
|
|
|
themes: [
|
|
|
|
{
|
2021-12-03 08:21:24 +00:00
|
|
|
light: {
|
2023-09-27 08:00:26 +00:00
|
|
|
...excludeThemeColor(lightTheme, [
|
|
|
|
"primary-content",
|
|
|
|
"secondary-content",
|
|
|
|
"accent-content",
|
|
|
|
]),
|
|
|
|
primary: "#ea5252",
|
|
|
|
secondary: "#ef9fbc",
|
|
|
|
accent: "#65c3c8",
|
2021-12-03 08:21:24 +00:00
|
|
|
},
|
|
|
|
},
|
2023-09-27 08:00:26 +00:00
|
|
|
{
|
|
|
|
dark: {
|
|
|
|
...excludeThemeColor(darkTheme, [
|
|
|
|
"primary-content",
|
|
|
|
"secondary-content",
|
|
|
|
"accent-content",
|
|
|
|
]),
|
|
|
|
primary: "#ea5252",
|
|
|
|
secondary: "#ef9fbc",
|
|
|
|
accent: "#65c3c8",
|
2021-12-03 08:21:24 +00:00
|
|
|
},
|
|
|
|
},
|
2023-09-27 08:00:26 +00:00
|
|
|
],
|
2021-12-03 08:21:24 +00:00
|
|
|
},
|
|
|
|
};
|