Last active
March 16, 2026 02:58
-
-
Save omer-os/85f9091beddf5219001ae4040815b140 to your computer and use it in GitHub Desktop.
svelte-shadcn utils file
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, type ClassValue } from "clsx"; | |
| import { twMerge } from "tailwind-merge"; | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)); | |
| } | |
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | |
| export type WithoutChild<T> = T extends { child?: any } ? Omit<T, "child"> : T; | |
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | |
| export type WithoutChildren<T> = T extends { children?: any } ? Omit<T, "children"> : T; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment