dev: added tailwind merge helper function (#2844)

This commit is contained in:
Aaryan Khandelwal
2023-11-23 17:21:47 +05:30
committed by sriram veeraghanta
parent fc523c6485
commit bf525aa2c4
5 changed files with 31 additions and 5 deletions

View File

@@ -1,3 +1,6 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export const debounce = (func: any, wait: number, immediate: boolean = false) => {
let timeout: any;
@@ -18,3 +21,5 @@ export const debounce = (func: any, wait: number, immediate: boolean = false) =>
};
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL ? process.env.NEXT_PUBLIC_API_BASE_URL : "";
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));