From 5c4badb837f59ef121a0b5baa61ab3181300f1b1 Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Wed, 14 Jan 2026 12:12:48 +0100 Subject: [PATCH] feat: add utility function for class merging with Tailwind and clsx Introduce `cn` utility function to simplify class name manipulation by combining `clsx` and `tailwind-merge`. --- frontend/src/lib/utils.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 frontend/src/lib/utils.ts diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts new file mode 100644 index 0000000..bd0c391 --- /dev/null +++ b/frontend/src/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +}