nextui-org / tailwind-variants

🦄 Tailwindcss first-class variant API
https://tailwind-variants.org
MIT License
2.42k stars 68 forks source link

rounded classes did not get merged when using custom className #45

Closed yaman3bd closed 1 year ago

yaman3bd commented 1 year ago

Describe the bug I am using TV to style my button component and I have a rounded variant, rounded variant by default is md in defaultVariants when I tried to add a class name rounded-0 to override the base class, the classes did not get merged and both of the classes are on the component when I tried to add a class name to override the color variant by adding new class, the classes got merged and the background color on the component is what I passed from className

<Button
      variant="solid"
      color="danger"
      className="rounded-0 bg-secondary text-danger hover:bg-secondary-700"
>
 Custom
</Button>

Expected behavior it should override the base class with the given class in className

Screenshots Screenshot 2023-05-03 at 7 51 04 PM

yaman3bd commented 1 year ago

I found out tv only merges tailwindcss default classes if it is a custom class will not merge it, I tried to replace rounded-0 with rounded-none and it worked