dev: added tailwind merge helper function (#2844)
This commit is contained in:
parent
fc523c6485
commit
bf525aa2c4
5 changed files with 31 additions and 5 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
"@types/lodash.debounce": "^4.0.7",
|
||||
"@types/react-datepicker": "^4.8.0",
|
||||
"axios": "^1.1.3",
|
||||
"clsx": "^2.0.0",
|
||||
"cmdk": "^0.2.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"dotenv": "^16.0.3",
|
||||
|
|
@ -55,6 +56,7 @@
|
|||
"react-popper": "^2.3.0",
|
||||
"sharp": "^0.32.1",
|
||||
"swr": "^2.1.3",
|
||||
"tailwind-merge": "^2.0.0",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue