Initial commit

This commit is contained in:
Rami Bitar
2026-04-11 14:03:15 -04:00
commit e60949ce4f
75 changed files with 10730 additions and 0 deletions

18
lib/utils.ts Normal file
View File

@@ -0,0 +1,18 @@
import { twMerge } from 'tailwind-merge';
type ClassValue = string | undefined | null | false | Record<string, boolean>;
type ClassArray = ClassValue[];
export function cn(...classes: (ClassValue | ClassArray)[]): string {
const merged = classes
.flat()
.filter((cls): cls is string => typeof cls === 'string')
.join(' ');
return twMerge(merged);
}
export const truncate = (text: string, maxLength: number): string => {
if (!text) return '';
if (text.length <= maxLength) return text;
return text.slice(0, maxLength).trim() + '...';
};