-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Index.svelte
45 lines (41 loc) 路 1.01 KB
/
Index.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script context="module" lang="ts">
export { default as BaseButton } from "./shared/Button.svelte";
</script>
<script lang="ts">
import type { Gradio, ShareData } from "@gradio/utils";
import Button from "./shared/Button.svelte";
export let elem_id = "";
export let elem_classes: string[] = [];
export let visible = true;
export let value: string;
export let variant: "primary" | "secondary" | "stop" = "secondary";
export let interactive: boolean;
export let size: "sm" | "lg" = "lg";
export let scale: number | null = null;
export let icon: string | null = null;
export let link: string | null = null;
export let min_width: number | undefined = undefined;
export let gradio: Gradio<{
click: never;
}>;
export let root = "";
export let root_url: null | string = null;
</script>
<Button
{value}
{variant}
{elem_id}
{elem_classes}
{size}
{scale}
{link}
{icon}
{min_width}
{visible}
{root}
{root_url}
disabled={!interactive}
on:click={() => gradio.dispatch("click")}
>
{gradio.i18n(value)}
</Button>