c10f335038
Co-authored-by: Douwe Osinga <douwe@squareup.com>
14 lines
356 B
TypeScript
14 lines
356 B
TypeScript
import { clsx, type ClassValue } from 'clsx';
|
|
import { twMerge } from 'tailwind-merge';
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|
|
|
|
export function snakeToTitleCase(snake: string): string {
|
|
return snake
|
|
.split('_')
|
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
.join(' ');
|
|
}
|