From 4983ddbc1759c1830129bf68218b015a8df30243 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sun, 18 Jul 2021 09:42:07 +1000 Subject: [PATCH] Remove primary colour from colour options --- .../map/controls/DrawingToolSettings.tsx | 1 + .../map/controls/PointerToolSettings.tsx | 2 +- src/components/note/NoteMenu.tsx | 58 ++++++++--------- src/components/token/TokenMenu.tsx | 62 ++++++++++--------- 4 files changed, 64 insertions(+), 59 deletions(-) diff --git a/src/components/map/controls/DrawingToolSettings.tsx b/src/components/map/controls/DrawingToolSettings.tsx index b4e8d61..e66205e 100644 --- a/src/components/map/controls/DrawingToolSettings.tsx +++ b/src/components/map/controls/DrawingToolSettings.tsx @@ -123,6 +123,7 @@ function DrawingToolSettings({ onSettingChange({ color })} + exclude={["primary"]} /> onSettingChange({ color })} - exclude={["black", "darkGray", "lightGray", "white"]} + exclude={["black", "darkGray", "lightGray", "white", "primary"]} /> ); diff --git a/src/components/note/NoteMenu.tsx b/src/components/note/NoteMenu.tsx index 4096ec7..04933ad 100644 --- a/src/components/note/NoteMenu.tsx +++ b/src/components/note/NoteMenu.tsx @@ -167,34 +167,36 @@ function NoteMenu({ justifyContent: "space-between", }} > - {colorOptions.map((color) => ( - handleColorChange(color)} - aria-label={`Note label Color ${color}`} - > - {note && note.color === color && ( - - )} - - ))} + {colorOptions + .filter((color) => color !== "primary") + .map((color) => ( + handleColorChange(color)} + aria-label={`Note label Color ${color}`} + > + {note && note.color === color && ( + + )} + + ))} - {colorOptions.map((color) => ( - handleStatusChange(color)} - aria-label={`Token label Color ${color}`} - > - {tokenState && - tokenState.statuses && - tokenState.statuses.includes(color) && ( - - )} - - ))} + {colorOptions + .filter((color) => color !== "primary") + .map((color) => ( + handleStatusChange(color)} + aria-label={`Token label Color ${color}`} + > + {tokenState && + tokenState.statuses && + tokenState.statuses.includes(color) && ( + + )} + + ))}