readest/apps/readest-app/tailwind.config.ts

42 lines
979 B
TypeScript

import type { Config } from 'tailwindcss';
import { themes } from './src/styles/themes';
import daisyui from 'daisyui';
const config: Config = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
],
safelist: [
{ pattern: /bg-./ },
{ pattern: /text-./ },
{ pattern: /fill-./ },
{ pattern: /decoration-./ },
{ pattern: /tooltip-./ },
],
theme: {
extend: {
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
},
},
},
plugins: [daisyui],
daisyui: {
themes: themes.reduce(
(acc, { name, colors }) => {
acc.push({
[`${name}-light`]: colors.light,
});
acc.push({
[`${name}-dark`]: colors.dark,
});
return acc;
},
['light', 'dark'] as (Record<string, unknown> | string)[],
),
},
};
export default config;