UNPKG

@volvo-cars/css

Version:
31 lines (27 loc) 760 B
type ClassValue = ClassArray | string | number | null | boolean | undefined; interface ClassArray extends Array<ClassValue> { } /** * Conditionally join strings of class names together, filtering out falsy values. * * @example * cssJoin('bg-secondary', variant === 'primary' && 'text-primary') * * @param classes */ declare function cssJoin(...classes: ClassValue[]): string; /** * Merges conflicting classes that apply to the same CSS property. * E.g. turns `px-8 p-0` into `p-0`. * * Classes are first passed through `cssJoin`. * * @param classes * @returns */ declare function cssMerge(...classes: ClassValue[]): string; /** * @deprecated Use `cssJoin` instead. */ declare const clsx: typeof cssJoin; export { clsx, cssJoin, cssMerge };