Perplexica/ui/tailwind.config.ts

53 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-07-05 14:36:50 +08:00
import type { Config } from "tailwindcss";
import type { DefaultColors } from "tailwindcss/types/generated/colors";
2024-05-27 11:49:09 +08:00
const themeDark = (colors: DefaultColors) => ({
2024-07-05 14:36:50 +08:00
50: "#0a0a0a",
100: "#111111",
200: "#1c1c1c",
2024-05-27 11:49:09 +08:00
});
const themeLight = (colors: DefaultColors) => ({
2024-07-05 14:36:50 +08:00
50: "#fcfcf9",
100: "#f3f3ee",
200: "#e8e8e3",
2024-05-27 11:49:09 +08:00
});
2024-04-09 16:21:05 +05:30
const config: Config = {
content: [
2024-07-05 14:36:50 +08:00
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
2024-04-09 16:21:05 +05:30
],
2024-07-05 14:36:50 +08:00
darkMode: "class",
2024-04-09 16:21:05 +05:30
theme: {
2024-05-24 20:29:49 +08:00
extend: {
2024-05-27 11:49:09 +08:00
borderColor: ({ colors }) => {
return {
light: themeLight(colors),
dark: themeDark(colors),
};
2024-05-24 20:29:49 +08:00
},
2024-05-27 11:49:09 +08:00
colors: ({ colors }) => {
const colorsDark = themeDark(colors);
const colorsLight = themeLight(colors);
return {
dark: {
primary: colorsDark[50],
secondary: colorsDark[100],
...colorsDark,
},
light: {
primary: colorsLight[50],
secondary: colorsLight[100],
...colorsLight,
},
};
2024-05-24 20:29:49 +08:00
},
},
2024-04-09 16:21:05 +05:30
},
2024-07-05 14:36:50 +08:00
plugins: [require("@tailwindcss/typography")],
2024-04-09 16:21:05 +05:30
};
export default config;