tailwind-variants
Version:
🦄 Tailwindcss first-class variant API
22 lines (18 loc) • 725 B
TypeScript
import type {extendTailwindMerge} from "tailwind-merge";
type MergeConfig = Parameters<typeof extendTailwindMerge>[0];
type LegacyMergeConfig = Extract<MergeConfig, {extend?: unknown}>["extend"];
export type TWMConfig = {
/**
* Whether to merge the class names with `tailwind-merge` library.
* It's avoid to have duplicate tailwind classes. (Recommended)
* @see https://github.com/dcastil/tailwind-merge/blob/v2.2.0/README.md
* @default true
*/
twMerge?: boolean;
/**
* The config object for `tailwind-merge` library.
* @see https://github.com/dcastil/tailwind-merge/blob/v2.2.0/docs/configuration.md
*/
twMergeConfig?: MergeConfig & LegacyMergeConfig;
};
export type TVConfig = TWMConfig;