Generic Slot Components
Loading "Generic Slot Components"
Run locally for transcripts
π¨βπΌ You'll notice our party mode toggle button is using
useId
to properly
associate the toggle button with its label. We'd like to make that implicit and
reuse the Label
component for the Toggle
as well.Please update the
Toggle
component in to
render a SlotContext
provider (in addition to the ToggleContext
provider
it's already rendering) so it can provide props for a label
slot (the slot
name for a Label
). You'll also want to put the id
in the ToggleContext
so
the ToggleButton
can grab it.