7 lines
205 B
TypeScript
7 lines
205 B
TypeScript
|
|
type ClassValue = string | false | null | undefined;
|
||
|
|
|
||
|
|
/** Tiny className joiner. Filters out falsy values. */
|
||
|
|
export function cx(...args: ClassValue[]): string {
|
||
|
|
return args.filter(Boolean).join(' ');
|
||
|
|
}
|