Provides children to a component's slots.
export default function () { return ( <MyComponent> <Slot name="foo"><span>foo</span></Slot> <Slot name="bar"><span>bar</span></Slot> <span>baz</span> </MyComponent> )})
Finds root-level instances of slot components and maps their children to an object.
export default function MyComponent ({ children }) { const slots = findSlots(children) return ( <div> <div>{slots.foo}</div> <div>{slots.bar}</div> <div>{slots.defaultSlot}</div> </div> )})
Component children
Object of children mapped to slot names
Generated using TypeDoc
Provides children to a component's slots.