feat(utils): add utility function for class merging
Introduced `cn` function leveraging `clsx` and `twMerge` to merge class names. This utility simplifies handling of conditional class names with Tailwind CSS.
This commit is contained in:
parent
f982d076a7
commit
9b2a86d887
6
src/lib/utils.ts
Normal file
6
src/lib/utils.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { clsx, type ClassValue } from "clsx"
|
||||||
|
import { twMerge } from "tailwind-merge"
|
||||||
|
|
||||||
|
export function cn(...inputs: ClassValue[]) {
|
||||||
|
return twMerge(clsx(inputs))
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user