Component macro (code snippets reuse between components/presenters templates)

2 years ago

dkorpar
Member | 55
+
0
-

I need some way of nice and easy macro so I can reuse snippets of code across project (in presenter templates/component templates)
for example (

<button type="button" class="btn btn-secondary button-box">
    <span class="icon {$icon_class}" aria-hidden="true"></span>
</button>

)

defining/importing blocks is something closest to that but it's not really available to both component templates and presenters templates and I would not like to include those in every component seperatelly

This looks good, but it's out of date…
Anything like this but up to date?
https://github.com/…ponent-macro

Any other good solutions?

2 years ago

dkorpar
Member | 55
+
0
-

To respond to myself if someone will need it, I've found this: https://github.com/…ponent-macro