diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index 3c4d8d2..0000000 --- a/tailwind.config.js +++ /dev/null @@ -1,55 +0,0 @@ -const { Theme } = require('./build/index.js'); - -const theme = new Theme({ - colors: { - somecolor: '#e9e6ff', - primary: { - DEFAULT: '#ffcccc', - 100: '#ffcccc', - 200: '#ff9999', - 300: '#ff6666', - 400: '#ff3333', - }, - }, -}); - -const darkMode = theme.variant( - { - colors: { - primary: { - DEFAULT: '#0f172a', - 400: '#475569', - 300: '#334155', - 200: '#1e293b', - 100: '#0f172a', - }, - }, - }, - { - mediaQuery: '@media (prefers-color-scheme: dark)', - } -); - -const coolTheme = theme.variant( - { - colors: { - somecolor: '#555', - }, - }, - { - selector: '[data-theme="cool-theme"]', - } -); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [], - theme: { - extend: {}, - }, - plugins: [ - theme.create({ - '[data-theme="dark"]': darkMode, - }), - ], -}; diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..8333f6c --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,57 @@ +import type { Config } from "tailwindcss"; +import { Theme } from "./build/index.js"; + +const theme = new Theme({ + colors: { + somecolor: "#e9e6ff", + primary: { + DEFAULT: "#ffcccc", + 100: "#ffcccc", + 200: "#ff9999", + 300: "#ff6666", + 400: "#ff3333", + }, + }, +}); + +const darkMode = theme.variant( + { + colors: { + primary: { + DEFAULT: "#0f172a", + 400: "#475569", + 300: "#334155", + 200: "#1e293b", + 100: "#0f172a", + }, + }, + }, + { + mediaQuery: "@media (prefers-color-scheme: dark)", + } +); + +const coolTheme = theme.variant( + { + colors: { + somecolor: "#555", + }, + }, + { + selector: '[data-theme="cool-theme"]', + } +); + +const config = { + content: [], + theme: { + extend: {}, + }, + plugins: [ + theme.create({ + '[data-theme="dark"]': darkMode, + }), + ], +} satisfies Config; + +export default config;