Initial commit

This commit is contained in:
Rami Bitar
2026-04-13 15:31:36 -04:00
commit 30d1853131
76 changed files with 11604 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() + '...';
};