summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/tweaks.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index 709cbf5..bd607b7 100644
--- a/components/tweaks.tsx
+++ b/components/tweaks.tsx
@@ -372,6 +372,9 @@ export const Tweaks = (props: TweakProps) => {
type="checkbox"
defaultValue={visuals.nodeColorScheme}
onChange={(colors) => {
+ if (!colors.length) {
+ return
+ }
setVisuals({ ...visuals, nodeColorScheme: colors })
console.log(visuals.nodeColorScheme)
}}
@@ -383,6 +386,10 @@ export const Tweaks = (props: TweakProps) => {
(c) => c === color,
)}
value={color}
+ isDisabled={
+ visuals.nodeColorScheme.length === 1 &&
+ visuals.nodeColorScheme[0] === color
+ }
>
<Box
justifyContent="space-between"