2023-09-27 16:00:26 +08:00
|
|
|
const lightTheme = require("daisyui/src/theming/themes")["[data-theme=light]"];
|
|
|
|
const darkTheme = require("daisyui/src/theming/themes")["[data-theme=dark]"];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {{[key: string]: string}} theme
|
|
|
|
* @param {string[]} exclude
|
|
|
|
* @returns {{[key: string]: string}}
|
|
|
|
*/
|
|
|
|
function excludeThemeColor(theme, exclude) {
|
|
|
|
/** @type {typeof theme} */
|
|
|
|
const newObj = {};
|
|
|
|
for (const key in theme) {
|
|
|
|
if (exclude.includes(key)) continue;
|
|
|
|
newObj[key] = theme[key];
|
|
|
|
}
|
|
|
|
return newObj;
|
|
|
|
}
|
|
|
|
|
2021-12-03 16:21:24 +08:00
|
|
|
module.exports = {
|
2023-09-27 16:00:26 +08:00
|
|
|
daisyui: {
|
|
|
|
themes: [
|
|
|
|
{
|
2021-12-03 16:21:24 +08:00
|
|
|
light: {
|
2023-09-27 16:00:26 +08:00
|
|
|
...excludeThemeColor(lightTheme, [
|
|
|
|
"primary-content",
|
|
|
|
"secondary-content",
|
|
|
|
"accent-content",
|
|
|
|
]),
|
|
|
|
primary: "#ea5252",
|
|
|
|
secondary: "#ef9fbc",
|
|
|
|
accent: "#65c3c8",
|
2021-12-03 16:21:24 +08:00
|
|
|
},
|
|
|
|
},
|
2023-09-27 16:00:26 +08:00
|
|
|
{
|
|
|
|
dark: {
|
|
|
|
...excludeThemeColor(darkTheme, [
|
|
|
|
"primary-content",
|
|
|
|
"secondary-content",
|
|
|
|
"accent-content",
|
|
|
|
]),
|
|
|
|
primary: "#ea5252",
|
|
|
|
secondary: "#ef9fbc",
|
|
|
|
accent: "#65c3c8",
|
2021-12-03 16:21:24 +08:00
|
|
|
},
|
|
|
|
},
|
2023-09-27 16:00:26 +08:00
|
|
|
],
|
2021-12-03 16:21:24 +08:00
|
|
|
},
|
|
|
|
};
|