Last active 2 months ago
react-utility
This is a react utility to concatenate class names, including the ability to support conditional class names
0
0
3
| 1 | type Argument = string | boolean | null | undefined | number |
| 2 | |
| 3 | /** |
| 4 | * |
| 5 | * Combines multiple class name arguments, automatically filtering out falsy values |
| 6 | * (false, null, undefined) and normalizing any extra whitespace within or between |
| 7 | * class names. Supports conditionally joining class names into a single string. |
| 8 | * |
| 9 | * @param args - Class name strings or conditional expressions that resolve to strings/booleans |
| 10 | * @returns A single normalized class name string with no extra whitespace |