New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dynamic :webc:is value #143
Comments
Update: I currently landed on this syntax.
Which I must say is still cool and compact! Note: As you can see, there is still some messing around to be done with the @ attributes but I guess it is another topic. |
Related #148 |
Note that the only current dynamic |
Just to make sure I was clear... Note that it seems to work when we don't need props.
|
Ran into this today, and it took me way too long to find my way through with a workaround: <span
webc:if="this.logo"
webc:type="11ty"
11ty:type="liquid"
webc:nokeep
webc:raw
>{% render "logos/{{ logo }}.svg" %}</span>
Hope that's helpful for someone. This would be an extremely useful feature in WebC. |
Hey! Doesn't seem like an urgent fix but...
This does not work properly (or at least not as I expected):
The component renders but the
test
prop is not passed.The workaround is probably to use a script.
Both work as expected.
My use case was the following:
I wanted to loop over an array of data with each entry containing the name of the component to be used and the props to be passed to said component.
I was trying something like this:
It looks super neat and compact! (but it does not work 😭😄)
The text was updated successfully, but these errors were encountered: