gradio/js/app/src/components/Button/Button.svelte

29 lines
658 B
Svelte
Raw Normal View History

2022-03-08 21:35:42 +08:00
<script lang="ts">
import { Button } from "@gradio/button";
import { _ } from "svelte-i18n";
2022-03-08 21:35:42 +08:00
export let elem_id: string = "";
export let elem_classes: Array<string> = [];
export let visible: boolean = true;
2022-03-29 21:10:35 +08:00
export let value: string;
Python backend to theming (#2931) * add theme + theme atoms * audio * buttons * chatbot * forms * start file * complete file * fixup workbench * gallery * highlighted text * label * json * upload * 3d model * atoms * chart * md + html * image * plot + build * table * tabs * tooltip * upload * tweaks * tweaks + more tooling * tweaks to padding/ lineheight * app components _ start api docs * format, more api docs * finish api docs * interpretation * todos * tweaks + cleanup * tweaks + cleanup * revert range tweaks * fix notebooks * fix test * remove tw * cleanup + login * fix gitignore * fix types * run css script * fix progress + tweaks * update demos * add css build to static check workflow * tweak ci * fix tests * tweak markdown * tweak chatbot + file * fix tabs * tweak tabs * cleanup * fix api docs * fix example gallery * add gradient to toast * fix min height for interfaces * revert tab changes * update notebooks * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * fix * changes * changes * changes * changes * changes * changes * undo radius * undo radius * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * change * undo * Add absolute imports * mock theme in tests * clean * changes * changes --------- Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-07 04:52:31 +08:00
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 min_width: number | undefined = undefined;
2022-03-08 21:35:42 +08:00
</script>
<Button
{variant}
{elem_id}
{elem_classes}
{size}
{scale}
{min_width}
{visible}
disabled={mode === "static"}
on:click
>
{$_(value)}
2022-03-08 21:35:42 +08:00
</Button>