viur-framework / flare

Python framework to create web-apps on top of Pyodide
https://flare.docs.viur.dev
MIT License
33 stars 10 forks source link

Implementing slots #12

Open phorward opened 3 years ago

phorward commented 3 years ago

This is a feature-request for implementing slots.

To implement such components

<popout icon="icon-arrowhead-down">
    <popout-item @click="onEdit">edit</popout-item>
    <popout-item @click="onLeave">leave</popout-item>
    <popout-item @click="onDelete">delete</popout-item>
</popout>

It would be nice to have slots, where the content of the popout will be inserted, like this:

<flare-icon [name]="icon" hidden></flare-icon>
<span [name]="text" hidden></span>

<div class="popout">
        <div [name]="popoutItemList" class="list">
                  <slot><!-- Default Content --></slot>
        </div>
</div>

From Vue.js there is also an extension for named slots. These should be considered as well.