[@labs/react] support multiple children with multiple slots
Related to https://github.com/lit/lit/issues/2734
This PR supports multiple children by assigning them to multiple slots by wrapping them in a <div styles="display: contents">.
A client can provide a children map similar to how we account for events.
The syntax is as follows:
const BasicElementComponent = createComponent(
window.React,
elementName,
BasicElement,
basicElementEvents,
displayName,
{ <react_children_property_name>: <slot_name> },
);
Which results in a children config like:
const BasicElementComponent = createComponent(
window.React,
elementName,
BasicElement,
basicElementEvents,
displayName,
{
headIcons: 'head-icons',
content: 'content',
tailIcons: 'tail-icons',
},
);
Tests are added to verify rendered elements are rendered with the correct slot names.
🦋 Changeset detected
Latest commit: 05d4b5fa4eae1e70c74c3ac81e6f98faafbb2868
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Ugh dumb thumbs, how do I cancel this review ;_;
Could I ask for why this is not being merged? Thank you. Do you need help to move this forward?