14 lines
440 B
TypeScript
14 lines
440 B
TypeScript
import type { ClassValue } from "clsx";
|
|
import { clsx } from "clsx";
|
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
|
|
// The type scale's sizes (style.css), registered so a size and a colour on
|
|
// one element are not merged as two colours.
|
|
const twMerge = extendTailwindMerge({
|
|
extend: { theme: { text: ["micro", "caption", "label", "title"] } },
|
|
});
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|