2022-02-02 22:02:09 +08:00
|
|
|
<script lang="ts">
|
2023-08-04 06:01:18 +08:00
|
|
|
import Checkbox from "../shared";
|
2023-02-23 07:16:15 +08:00
|
|
|
import { Block, Info } from "@gradio/atoms";
|
2023-08-04 06:01:18 +08:00
|
|
|
import { StatusTracker } from "@gradio/statustracker";
|
2023-08-16 02:21:41 +08:00
|
|
|
import type { LoadingStatus } from "@gradio/statustracker";
|
2022-03-12 00:00:48 +08:00
|
|
|
|
2023-08-04 06:01:18 +08:00
|
|
|
export let elem_id = "";
|
|
|
|
export let elem_classes: string[] = [];
|
|
|
|
export let visible = true;
|
|
|
|
export let value = false;
|
|
|
|
export let value_is_output = false;
|
|
|
|
export let label = "Checkbox";
|
2023-02-23 07:16:15 +08:00
|
|
|
export let info: string | undefined = undefined;
|
2023-08-04 06:01:18 +08:00
|
|
|
export let container = true;
|
2023-06-22 03:34:12 +08:00
|
|
|
export let scale: number | null = null;
|
2023-06-08 09:35:31 +08:00
|
|
|
export let min_width: number | undefined = undefined;
|
2022-05-06 03:05:05 +08:00
|
|
|
export let loading_status: LoadingStatus;
|
2022-02-01 21:45:55 +08:00
|
|
|
</script>
|
|
|
|
|
2023-06-08 09:35:31 +08:00
|
|
|
<Block {visible} {elem_id} {elem_classes} {container} {scale} {min_width}>
|
2022-05-06 03:05:05 +08:00
|
|
|
<StatusTracker {...loading_status} />
|
2022-04-26 22:48:39 +08:00
|
|
|
|
2023-02-23 07:16:15 +08:00
|
|
|
{#if info}
|
|
|
|
<Info>{info}</Info>
|
|
|
|
{/if}
|
2023-03-14 08:12:41 +08:00
|
|
|
<Checkbox
|
|
|
|
{label}
|
|
|
|
bind:value
|
2023-05-16 09:36:57 +08:00
|
|
|
bind:value_is_output
|
2023-03-14 08:12:41 +08:00
|
|
|
on:change
|
2023-05-16 09:36:57 +08:00
|
|
|
on:input
|
2023-03-14 08:12:41 +08:00
|
|
|
on:select
|
2023-08-04 06:01:18 +08:00
|
|
|
disabled
|
2023-03-14 08:12:41 +08:00
|
|
|
/>
|
2022-04-26 22:48:39 +08:00
|
|
|
</Block>
|