feat(utils): add utility function for class merging
A new utility function `cn` has been added to `utils.ts` for the purpose of class merging. This function uses "clsx" and "tailwind-merge" to merge class values, simplifying and optimizing the process of multiple class joining in our project.
This commit is contained in:
parent
7910c5ef25
commit
4d6ae67389
6
src/lib/utils.ts
Normal file
6
src/lib/utils.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { type ClassValue, clsx } 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