summaryrefslogtreecommitdiff
path: root/components/TagMenu.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-18 01:35:58 +0200
committerGitHub <[email protected]>2021-10-18 01:35:58 +0200
commit1bd0d713edf80c7390066619f843df5f787ddf80 (patch)
tree9a01b9a7b3e41cdb89edaf6db480f8af66864b28 /components/TagMenu.tsx
parent01d432e34c7c59a1d9d3c4c6ff8155a17e3fc00a (diff)
parentb76e55754ff054d0b2610a0afc6cac2a9b1b3b0e (diff)
Merge pull request #126 from org-roam/fix/123
fix: delete tag from preview pane (#123)
Diffstat (limited to 'components/TagMenu.tsx')
-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