mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
37caa2e0fe
* add icons and link params * tweak * add changeset * prepend icon param with /file= * prepend icon with /file= * restore and add button stories * add changeset * param description tweak * tweak param description * type tweak * fix i18n in story * fix formatting * fix test * tweak * fix typo * fix icon bug * fix inconsistent width * remove <a /> target * styling changes + add story --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
34 lines
738 B
Svelte
34 lines
738 B
Svelte
<script lang="ts">
|
|
import Button from "./Button.svelte";
|
|
import { _ } from "svelte-i18n";
|
|
|
|
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 mode: "static" | "dynamic" = "dynamic";
|
|
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;
|
|
</script>
|
|
|
|
<Button
|
|
{value}
|
|
{variant}
|
|
{elem_id}
|
|
{elem_classes}
|
|
{size}
|
|
{scale}
|
|
{link}
|
|
{icon}
|
|
{min_width}
|
|
{visible}
|
|
disabled={mode === "static"}
|
|
on:click
|
|
>
|
|
{$_(value)}
|
|
</Button>
|