summaryrefslogtreecommitdiff
path: root/components/tweaks.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-29 06:23:14 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-29 06:23:14 +0200
commit220a63994898fd65503fee2cd7ffc97d2583a2a5 (patch)
tree30b02f484847cef38e7a6a5c31dc4865758b0464 /components/tweaks.tsx
parente0c6d0ec5091536734288ab06ad4587b43387d2f (diff)
handled all node color cases
Diffstat (limited to 'components/tweaks.tsx')
-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"