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