conditionally render the checkbox

This commit is contained in:
Greg Saab 2025-10-08 13:04:50 -04:00
commit 6facce3fc1

View file

@ -178,12 +178,16 @@ const ToolsTab = ({
htmlFor={key}
className="text-sm font-medium text-gray-700 dark:text-gray-300"
>
Null
null
</label>
</div>
) : null}
</div>
<div
role="toolinputwrapper"
className={`${prop.nullable && params[key] === null ? "pointer-events-none opacity-50" : ""}`}
>
{prop.type === "boolean" ? (
<div className="flex items-center space-x-2 mt-2">
<Checkbox
@ -232,7 +236,8 @@ const ToolsTab = ({
}}
className="mt-1"
/>
) : prop.type === "object" || prop.type === "array" ? (
) : prop.type === "object" ||
prop.type === "array" ? (
<div className="mt-1">
<DynamicJsonForm
ref={(ref) => (formRefs.current[key] = ref)}
@ -318,6 +323,7 @@ const ToolsTab = ({
</div>
)}
</div>
</div>
);
},
)}