-
Notifications
You must be signed in to change notification settings - Fork 12
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
Templating wish list #26
Comments
One thing I can't do is a "default" fallback for when a property has multiple values. Currently, I have to negate all other values to get a "default" / fallback condition.
I wish I could use more of a "switch/case"-like syntax...
|
Conditional blocksSay I have a Button component with the following setup...
the following table illustrates which props apply for different values of
Current
IdealUsing EJS syntax for block conditionals... <% if (property.iconOnly == true) { %>
<my-button
iconleft="{{property.iconLeft}}"
></my-button>
<% } else { %>
<my-button
{{?property.iconRight}}iconright="{{property.iconRight}}"
{{?property.iconLeft}}iconleft="{{property.iconLeft}}"
>
{{property.label}}
</my-button>
<% } %> |
I'd like to use this issue to keep track of stuff I wish I could do with the templating logic.
Ideally, I wish I could use an established templating language like EJS or doT.js.
The text was updated successfully, but these errors were encountered: