Created
March 2, 2024 11:36
-
-
Save josippapez/953cc4e01811cec6539609955dc09cf7 to your computer and use it in GitHub Desktop.
Tailwind merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { clsx } from "clsx"; | |
| import { ClassNameValue, extendTailwindMerge } from "tailwind-merge"; | |
| const extendedTwMerge = extendTailwindMerge({}); | |
| // used for merging tailwind classes with clsx | |
| export function cltm(...args: ClassNameValue[]) { | |
| return extendedTwMerge(clsx(args)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment