Remove clsx and tailwind-merge (as they are already part of tailwind-variants) #271
Replies: 5 comments
-
Do you test it without using one of them and just rely on tailwind-variant? |
Beta Was this translation helpful? Give feedback.
-
I tried for clsx , it can be removed for sure. Regarding
import type { ClassValue } from "tailwind-variants";
import { cnBase as cx } from "tailwind-variants";
import { twMerge } from "tailwind-merge";
export const cn = (...inputs: ClassValue[]): string => twMerge(cx(...inputs));
export function composeTailwindRenderProps<T>(
tw: string | (string | undefined)[],
className: string | ((v: T) => string) | undefined = "",
): string | ((v: T) => string) {
return composeRenderProps(className, (className) => twMerge(tw, className));
} |
Beta Was this translation helpful? Give feedback.
-
Interesting, I'll try it first so we don't have any problems with this. |
Beta Was this translation helpful? Give feedback.
-
Struggle with React Aria components? The Edited: I think I'll sleep on it. Thanks for remembering me @sohamnandi77 |
Beta Was this translation helpful? Give feedback.
-
oh okay, yeah i guess, |
Beta Was this translation helpful? Give feedback.
-
The project currently includes both clsx and tailwind-merge as dependencies. However, the tailwind-variants package already includes the functionality of clsx, tailwind-merge making the use of both redundant. Can we somehow remove it and some on bundle size ?
Beta Was this translation helpful? Give feedback.
All reactions