Toggle nodes/containers on and off by tags
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import { type WidgetLayout } from "$lib/stores/layoutState";
|
||||
import { Button } from "@gradio/button";
|
||||
import { get, type Writable, writable } from "svelte/store";
|
||||
import { isDisabled } from "./utils"
|
||||
export let widget: WidgetLayout | null = null;
|
||||
export let isMobile: boolean = false;
|
||||
let node: ComfyButtonNode | null = null;
|
||||
@@ -32,9 +33,9 @@
|
||||
|
||||
<div class="wrapper gradio-button">
|
||||
{#key $attrsChanged}
|
||||
{#if node !== null}
|
||||
{#if widget !== null && node !== null}
|
||||
<Button
|
||||
disabled={widget.attrs.disabled}
|
||||
disabled={isDisabled(widget)}
|
||||
on:click={onClick}
|
||||
variant={widget.attrs.buttonVariant || "primary"}
|
||||
size={widget.attrs.buttonSize === "small" ? "sm" : "lg"}
|
||||
|
||||
Reference in New Issue
Block a user