Closed tronikelis closed 9 months ago
Describe the bug If you have variants like this {foo: {true: "bar"}} and have defaultVariants: { foo: true }, then if the consumer sets foo as false, it does not remove the styles
{foo: {true: "bar"}}
defaultVariants: { foo: true }
foo
false
To Reproduce Steps to reproduce the behavior:
const card = tv({ base: "", variants: { foo: { true: "bar", }, }, defaultVariants: { foo: true, }, }); console.log([card({ foo: false })]); // ["bar"] console.log([card({ foo: undefined })]); // ["bar"]
Expected behavior If foo is false, then it should have the relevant styles removed
Desktop (please complete the following information):
Additional notes This might be related to: https://github.com/nextui-org/tailwind-variants/issues/141
@Tronikelis I updated my open PR to also fix this
Describe the bug If you have variants like this
{foo: {true: "bar"}}
and havedefaultVariants: { foo: true }
, then if the consumer setsfoo
asfalse
, it does not remove the stylesTo Reproduce Steps to reproduce the behavior:
Expected behavior If
foo
isfalse
, then it should have the relevant styles removedDesktop (please complete the following information):
Additional notes This might be related to: https://github.com/nextui-org/tailwind-variants/issues/141