11 lines
274 B
TypeScript
11 lines
274 B
TypeScript
import { clsx, type ClassValue } from "clsx";
|
|
import { twMerge } from "tailwind-merge";
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|
|
|
|
export function toTitleCase(str: string) {
|
|
return str.replace(/\b\w/g, (char) => char.toUpperCase());
|
|
}
|