legacy-paperclip icon indicating copy to clipboard operation
legacy-paperclip copied to clipboard

Ability for slots to accept certain children

Open crcn opened this issue 3 years ago • 0 comments

This can be reflected in the UI. For example:

<div component as="ButtonGroup">
  <slot name="children" accept="Button">
    <Button>I'm a button</Button>
    <Button>I'm a button</Button>
    <Button>I'm a button</Button>
  </slot>
</div>

Wiring this up should be straightforward. The compiler should look at accept and produce a list of { sourceUri, componentName } types that would be passed into listInsertableNodes

crcn avatar Feb 03 '22 14:02 crcn