Created
January 17, 2023 01:39
-
-
Save wKovacs64/7cb9084ea551b9a3bb07b98360c70908 to your computer and use it in GitHub Desktop.
cn: wrapper around clsx and tailwind-merge
This file contains 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
// Source: https://mobile.twitter.com/shadcn/status/1614692419039105024 | |
import { clsx, type ClassValue } from 'clsx'; | |
import { twMerge } from 'tailwind-merge'; | |
export function cn(...inputs: Array<ClassValue>) { | |
return twMerge(clsx(inputs)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment