From b76e55754ff054d0b2610a0afc6cac2a9b1b3b0e Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 18 Oct 2021 01:35:01 +0200 Subject: fix: delete tag from preview pane (#123) --- components/TagMenu.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'components') diff --git a/components/TagMenu.tsx b/components/TagMenu.tsx index 432e9a2..2a72e67 100644 --- a/components/TagMenu.tsx +++ b/components/TagMenu.tsx @@ -51,6 +51,28 @@ export const TagMenu = (props: TagMenuProps) => { + + + setTagColors((curr: { [tag: string]: string }) => + Object.fromEntries( + Object.keys(curr) + .filter((t) => t !== target) + .map((t) => [t, curr[t]]), + ), + ) + } + bgColor={''} + m={1} + borderRadius="sm" + borderColor="gray.600" + borderWidth={1} + height={3} + width={3} + > + {colorList.map((color: string) => (