Angular: VariantProps binds to 'any' when compoundVariants is defined #217
Unanswered
Nxtivision
asked this question in
Q&A
Replies: 1 comment
-
Sorry! I’m not an expert on Angular to provide any advice here, but I’ll move this to a discussion and hopefully someone else can chip in 🙏🏼 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I use this library with Angular and TailwindCSS. It's working perfectly fine, until I use
compoundVariants
Here is a simplified example of the problem:
And inside my component, I have something like this:
At this moment, it works fine, no problem, types are correctly recognized. But once I go to the HTML, I lose the type (see Picture 1)
As we can see,
variant
input is recognized asany
, which is kinda weird because all my other components work perfectly fine. The problem also appears with all the other inputs of this component. So I tried to remove thecompoundVariants
(see Picture 2)Removing the
compoundVariants
fixed the problem. Is it a bug ? :)To Reproduce
Steps explained previously seems to be sufficient.
Expected behavior
In my template, I would like to have my types when I use my component
Screenshots
Picture 1
Picture 2
Beta Was this translation helpful? Give feedback.
All reactions