Download 6.0.0-dev.4/dataframe/shared/BooleanCell.svelte from gradio/frontend: direct link, hf CLI and curl.
- Browser
- Download file 868 Bytes
-
https://huggingface.co/datasets/gradio/frontend/resolve/refs%2Fpr%2F1/6.0.0-dev.4/dataframe/shared/BooleanCell.svelte
- Command line
-
hf download hf://datasets/gradio/frontend@refs/pr/1/6.0.0-dev.4/dataframe/shared/BooleanCell.svelte
-
curl -L -o BooleanCell.svelte https://huggingface.co/datasets/gradio/frontend/resolve/refs%2Fpr%2F1/6.0.0-dev.4/dataframe/shared/BooleanCell.svelte
868 Bytes
| <script lang="ts"> | |
| import { BaseCheckbox } from "@gradio/checkbox"; | |
| export let value = false; | |
| export let editable = true; | |
| export let on_change: (value: boolean) => void; | |
| function handle_change(event: CustomEvent<boolean>): void { | |
| if (editable) { | |
| on_change(event.detail); | |
| } | |
| } | |
| </script> | |
| <div class="bool-cell" role="button" tabindex="-1"> | |
| <BaseCheckbox | |
| bind:value | |
| label="" | |
| interactive={editable} | |
| on:change={handle_change} | |
| /> | |
| </div> | |
| <style> | |
| .bool-cell { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: min-content; | |
| height: var(--size-full); | |
| margin: 0 auto; | |
| } | |
| .bool-cell :global(input:disabled) { | |
| cursor: not-allowed; | |
| } | |
| .bool-cell :global(label) { | |
| margin: 0; | |
| width: 100%; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| } | |
| .bool-cell :global(span) { | |
| display: none; | |
| } | |
| </style> | |