summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-18 01:35:01 +0200
committerThomas F. K. Jorna <[email protected]>2021-10-18 01:35:01 +0200
commitb76e55754ff054d0b2610a0afc6cac2a9b1b3b0e (patch)
tree9a01b9a7b3e41cdb89edaf6db480f8af66864b28 /components
parentca5cfb62c1cc1e2850103ba13ede59380e6808ba (diff)
fix: delete tag from preview pane (#123)
Diffstat (limited to 'components')
-rw-r--r--components/TagMenu.tsx22
1 files changed, 22 insertions, 0 deletions
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) => {
</MenuItem>
<Collapse in={colors.isOpen}>
<Flex ml={2} mt={2} flexWrap="wrap">
+ <Box key="empty">
+ <Box
+ tabIndex={0}
+ cursor="pointer"
+ onClick={() =>
+ 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}
+ ></Box>
+ </Box>
{colorList.map((color: string) => (
<Box key={color}>
<Box