-
Notifications
You must be signed in to change notification settings - Fork 2
/
tailwind.config.ts
32 lines (30 loc) · 920 Bytes
/
tailwind.config.ts
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
import { nextui } from "@nextui-org/theme";
import type { Config } from "tailwindcss";
// @ts-ignore
import { default as flattenColorPalette } from "tailwindcss/lib/util/flattenColorPalette";
function addVariablesForColors({ addBase, theme }: any) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val]),
);
addBase({
":root": newVars,
});
}
const config: Config = {
content: [
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/@nextui-org/theme/dist/components/(avatar|divider|image|link|snippet|popover|button|ripple|spinner).js"
],
darkMode: "class",
theme: {
extend: {
fontFamily: {
sans: ["var(--font-geist-sans)"],
},
},
},
plugins: [nextui(), addVariablesForColors],
};
export default config;