gradio/js/tabitem/Index.svelte
Hannah ec28b4e7c4
Add visible and interactive params to gr.Tab() (#7018)
* add tabs params and visible logic

* add disabled logic

* add tabbed_interface logic

* add tab accessibility improvements

* Add aria-disabled attribute to tab buttons

* add e2e test

* add changeset

* add changeset

* add tab e2e test

* formatting

* run generate_notebooks.py

* lint

* ensure tabs values update

* remove tabbedinterface logic

* Remove unused parameters from TabbedInterface constructor

* remove test

* add test

* add changeset

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-17 14:39:10 +01:00

27 lines
548 B
Svelte

<script lang="ts">
import type { Gradio, SelectData } from "@gradio/utils";
import TabItem from "./shared/TabItem.svelte";
export let elem_id = "";
export let elem_classes: string[] = [];
export let label: string;
export let id: string | number;
export let gradio: Gradio<{
select: SelectData;
}>;
export let visible = true;
export let interactive = true;
</script>
<TabItem
{elem_id}
{elem_classes}
name={label}
{visible}
{interactive}
{id}
on:select={({ detail }) => gradio.dispatch("select", detail)}
>
<slot />
</TabItem>