This is all really helpful! Thanks guys! I can get a lot of inspiration from the bulma components, some of this is not so easy to get your head around just from the docs, eg I found the button example helpful with the multiple “is_@colour: @colour” kinds of properties, as an example of what is possible! Nice!
As I have your attention, I have 2 follow on questions.
1 - I posted this also as an issue on github, but it seems to me that in the Card example, once you declare “Head” as a slot, then it’s render function becomes disabled? Looking at the code I’m not sure why though. I see that component declares a default render function in this case, but also marks it overrideable? I tried to follow through the rest of the render path, but it’s quite complex…
It seems useful to me to be able to set a render function for slots. The use would be that the upper level component understands where to place the slot in the layout, but the sub component might know how to render that slot.
Could we support this easily?
2 - I guess this is a failure to read the docs right, but could you give me a leg up on understanding how I would fish out a property from a slot component and use it back in the upper component,
eg imagine we had
<Footer class="footer_class" show="true">
stuff
</Footer>
and we want to place this into a template, but how can we read the Footer class/show variables? There is an example in the grids section, but I’m not sure I understand how to apply what is written?
eg I want to achieve something like:
<Card>
stuff
<div class=@footer.class>
<Footer class="footer_class" show="true">
more stuff
</Footer>
</div>
</Card>
Thanks for your advice