Closed wilsonlewis closed 1 year ago
Describe the bug Putting "text-{color}" class in the same variant as "text-{size}" class removes the color class
To Reproduce Steps to reproduce the behavior:
const config = { theme: { colors: { ... white: '#FFFFFF' }, fontSize: { ... '14': '0.875rem' } } }
Create variant
export const button = tv({ variants: { intent: { primary: 'text-white text-14', }, }, defaultVariants: { intent: 'primary', }, })
Add to component
function Component() { return <button className={button()}>Button</button> }
Check DOM and notice missing classes
Expected behavior No tailwind classes should be removed
Screenshots Notice "text-emerald" has been removed
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Hi @wilsonlewis please check this comment
https://github.com/nextui-org/tailwind-variants/issues/93#issuecomment-1685115214
Describe the bug Putting "text-{color}" class in the same variant as "text-{size}" class removes the color class
To Reproduce Steps to reproduce the behavior:
Create variant
Add to component
Check DOM and notice missing classes
Expected behavior No tailwind classes should be removed
Screenshots Notice "text-emerald" has been removed
Desktop (please complete the following information):
Additional context Add any other context about the problem here.