Files
wehub-resource-sync adf0d17497
publish / version_or_publish (push) Has been cancelled
storybook-build / changes (push) Has been cancelled
storybook-build / :storybook-build (push) Has been cancelled
Sync Gradio Skills to Hugging Face / sync-skills (push) Has been cancelled
functional / changes (push) Has been cancelled
functional / build-frontend (push) Has been cancelled
functional / functional-test-SSR=false (push) Has been cancelled
functional / functional-reload (push) Has been cancelled
js / changes (push) Has been cancelled
js / js-test (push) Has been cancelled
docs-build / changes (push) Has been cancelled
docs-build / docs-build (push) Has been cancelled
docs-build / website-build (push) Has been cancelled
functional / functional-test-SSR=true (push) Has been cancelled
hygiene / hygiene-test (push) Has been cancelled
python / changes (push) Has been cancelled
python / build (push) Has been cancelled
python / test-ubuntu-latest-flaky (push) Has been cancelled
python / test-ubuntu-latest-not-flaky (push) Has been cancelled
python / test-windows-latest-flaky (push) Has been cancelled
python / test-windows-latest-not-flaky (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:17:32 +08:00

55 lines
888 B
Svelte

<script lang="ts">
import { BaseCheckbox } from "@gradio/checkbox";
let {
value = $bindable(false),
editable = true,
on_change
}: {
value?: boolean;
editable?: boolean;
on_change: (value: boolean) => void;
} = $props();
function handle_change(val: boolean): void {
if (editable) {
on_change(val);
}
}
</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);
}
.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>