-
-
Save alamenai/e7b6abee3ed0c7e21e937acb5a86b48d to your computer and use it in GitHub Desktop.
TailwinCSS merge and conditonal styling.
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, ClassValue } from "clsx"; | |
import { twMerge } from "tailwind-merge"; | |
export const cn = (...inputs: ClassValue[]) => { | |
return twMerge(clsx(inputs)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment