import { computed, NAME, pattern, UI, type VNode, Writable, } from "commonfabric"; import { Controls, SelectControl, SwitchControl, } from "../ui/controls/index.ts"; // deno-lint-ignore no-empty-interface interface ToggleStoryInput {} export interface ToggleStoryOutput { [NAME]: string; [UI]: VNode; controls: VNode; } export default pattern(() => { const pressed = new Writable(false); const disabled = new Writable(false); const variant = new Writable<"default" | "outline">("default"); const size = new Writable<"default" | "sm" | "lg">("default"); const status = computed(() => (pressed.get() ? "Pressed" : "Not pressed")); return { [NAME]: "cf-toggle Story", [UI]: (
Bold {status}
), controls: ( <> ), }; });