Closed fcroce closed 2 years ago
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.
Thank you for using Stencil!
First of all: brilliant work! These components are very lightweighted 💪
The issue:
If I use
classnames
I get this warning'classnames': Stencil can already render conditional classes:
But Stencil can't handle simple lists of classes:
['my-class1', 'my-class2', 'my-class3']
I know we can write it as:
but it looks particularely verbose if we have complex combinations.
Example: I have a component that can receive a list of classes from the parent component:
<my-component arrow-left-classes="example1,example2,example3" arrow-right-classes="example1,example2" />
and then in the component I have something like a carousel:
This will NOT work because classes won't accept arrays and the transformation for those arrays is verbose and bad for the maintainability of the code, so I used classnames:
Everything works fine, except the annoying warning to not use classmates 😅