From 32e1bd2ddaebde9b3a81e784920495feb29883e1 Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Fri, 21 Jun 2024 00:15:40 -0700 Subject: [PATCH] add badges for tag filter shortcuts --- frontend/src/components/export.tsx | 2 +- frontend/src/components/tags/index.tsx | 36 +++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/export.tsx b/frontend/src/components/export.tsx index 32d61cb5d..8a96e65c6 100644 --- a/frontend/src/components/export.tsx +++ b/frontend/src/components/export.tsx @@ -28,8 +28,8 @@ export const ExportButton = ({ diff --git a/frontend/src/components/tags/index.tsx b/frontend/src/components/tags/index.tsx index 5d86e20bc..9bca17fb1 100644 --- a/frontend/src/components/tags/index.tsx +++ b/frontend/src/components/tags/index.tsx @@ -39,6 +39,23 @@ export const TagsFilter = () => { tag_ids={tags} onBadgeClick={(tag_id) => setTags(tags.filter((id) => id !== tag_id))} /> + + {tags.length > 0 && ( + setTags([])} + > + Clear + + shift + c + + + )} + { @@ -47,8 +64,15 @@ export const TagsFilter = () => { }} > - @@ -257,8 +281,14 @@ export const AddTags = ({ target }: { target: TargetExcludingSystem }) => { return ( -