import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; /** * The class merger shadcn's variants are written against. * * twMerge is the part that earns its place: it resolves CONFLICTS by Tailwind's * own semantics, so a variant's `px-2` and a caller's `px-4` do not both end up * in the class list with the winner decided by stylesheet order. Without it, * every override has to be a longer selector or a `!`. */ export function cn(...inputs: ClassValue[]): string { return twMerge(clsx(inputs)); }