I believe the last performance improvements releases have created the typescript auto complete to stop working for compound conditions definition for external props. Variants conditions are still auto complete
what I mean is:
interface OtherProps {
isDisabled: boolean
}
const btn = compose({
variants: {
animal: // default variants def
}
compoundVariants: [
{
conditions: {
isDisabled: true, // working but not auto complete anymore
animal: "cat" // working and auto complete
},
class: "bg-red-500"
}
],
defaultVariants: }
animal: "dog"
}
})<OtherProps>()
// this usage is still auto complete properly
btn({
animal: "cat",
isDisabled: true
})
this bug is really limited and does not affect usage. But still make the devex experience for the creator of the lib a bit less good.
As the typing is a bit hard for this one. It will probably take time to fix.
I believe the last performance improvements releases have created the typescript auto complete to stop working for compound conditions definition for external props. Variants conditions are still auto complete
what I mean is:
this bug is really limited and does not affect usage. But still make the devex experience for the creator of the lib a bit less good.
As the typing is a bit hard for this one. It will probably take time to fix.