mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-11-17 12:19:20 +00:00
🔧 chore: implement classnames utils
This commit is contained in:
parent
e70bb34190
commit
237e9e5cb9
13
packages/frontend/src/utils/classnames.ts
Normal file
13
packages/frontend/src/utils/classnames.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { clsx } from 'clsx';
|
||||
import type { ClassValue } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
/**
|
||||
* Returns a merged class name string by merging and processing multiple class names and Tailwind CSS styles.
|
||||
*
|
||||
* @param {...string[]} args - One or more class names and/or Tailwind CSS styles to be merged.
|
||||
* @returns {string} - The merged class name string.
|
||||
*/
|
||||
export function cn(...args: ClassValue[]): string {
|
||||
return twMerge(clsx(args));
|
||||
}
|
Loading…
Reference in New Issue
Block a user