UNPKG

@awal-solution/tailwind-theming

Version:

<div align="left"> <h1>Tailwind theming</h1> <p>The <b>TailwindCSS Multi-Theming Plugin</b> is a utility for creating and managing multiple themes in your TailwindCSS-based projects. With this library, you can define, add, update, and remove themes dyn

27 lines (26 loc) 876 B
import { TailwindExtension } from '../config'; export type DefaultThemeConfig = Omit<ThemeConfig, 'selectors' | 'mediaQuery'>; export interface ThemeConfig { name: string; selectors?: string[]; mediaQuery?: string; extend: TailwindExtension; } export interface MultiThemePluginOptions { defaultTheme?: DefaultThemeConfig; themes?: ThemeConfig[]; utilities?: Record<string, any>; } export interface AddThemeType { name: string; theme: TailwindExtension; } export interface Theme extends TailwindExtension { selectors?: string[]; } export interface ThemeManagerType<T extends ThemeConfig['name'] = ThemeConfig['name']> { themes: Record<string, Theme>; utilities?: Record<string, any>; defaultTheme?: Extract<T, string>; } export type DefaultThemeName<T extends ThemeConfig['name'] = ThemeConfig['name']> = Extract<T, string>;