feat: add src/lib/utils.ts

This commit is contained in:
cupadev-admin 2026-03-08 18:33:42 +00:00
parent 8ea7de7a27
commit c99448d6b1
1 changed files with 13 additions and 0 deletions

13
src/lib/utils.ts Normal file
View File

@ -0,0 +1,13 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export const scrollToSection = (id: string) => {
const element = document.getElementById(id);
if (element) {
element.scrollIntoView({ behavior: "smooth" });
}
};