Add React editor project

This commit is contained in:
Rami Bitar
2026-08-09 16:00:10 -04:00
parent 909d99251a
commit 63ecc5e284
212 changed files with 20655 additions and 11571 deletions
+6 -5
View File
@@ -1,11 +1,12 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function truncate(text: string, max = 80): string {
if (!text) return "";
return text.length > max ? text.slice(0, max - 1).trimEnd() + "…" : text;
export function truncate(str: string, maxLength: number): string {
if (!str) return '';
if (str.length <= maxLength) return str;
return str.slice(0, maxLength).trim() + '...';
}