1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-05 19:15:30 -04:00

chore: update shadcn primitives

This commit is contained in:
2026-01-28 13:56:39 -05:00
parent 5fc9efb181
commit 9d8e775fcd
51 changed files with 2206 additions and 301 deletions
+2 -16
View File
@@ -1,20 +1,6 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export const cn = (...inputs: ClassValue[]) => {
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
};
/**
* Recursively extracts plain text content from React nodes.
* Replacement for the `react-to-text` package.
*/
export const getTextContent = (node: React.ReactNode): string => {
if (node == null || typeof node === "boolean") return "";
if (typeof node === "string" || typeof node === "number") return String(node);
if (Array.isArray(node)) return node.map(getTextContent).join("");
if (typeof node === "object" && "props" in node) {
return getTextContent((node as React.ReactElement<{ children?: React.ReactNode }>).props.children);
}
return "";
};
}