TabPanel: add selected slot prop

This commit is contained in:
Ryan Gossiaux
2021-12-30 12:51:06 -10:00
parent a9d57659fb
commit e0d64f9bfc

View File

@@ -37,6 +37,8 @@
$: if (process.env.NODE_ENV === "test") {
Object.assign(propsWeControl, { ["data-headlessui-index"]: myIndex });
}
$: slotProps = { selected };
</script>
<Render
@@ -44,9 +46,10 @@
{as}
use={[...use, forwardEvents]}
name={"TabPanel"}
{slotProps}
bind:el={$elementRef}
visible={selected}
features={Features.RenderStrategy | Features.Static}
>
<slot />
<slot {...slotProps} />
</Render>