-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtailwind.config.js
More file actions
50 lines (48 loc) · 1.19 KB
/
tailwind.config.js
File metadata and controls
50 lines (48 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
}
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx,html}"],
darkMode: ["class", '[data-theme="dark"]'],
daisyui: {
themes: [
{
light: {
...excludeThemeColor(lightTheme, [
"primary-content",
"secondary-content",
"accent-content",
]),
primary: "#ea5252",
secondary: "#ef9fbc",
accent: "#65c3c8",
},
},
{
dark: {
...excludeThemeColor(darkTheme, [
"primary-content",
"secondary-content",
"accent-content",
]),
primary: "#ea5252",
secondary: "#ef9fbc",
accent: "#65c3c8",
},
},
],
},
}