summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/PillButton.tsx
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-04 13:50:28 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-04 13:50:28 -0700
commitbd202df41755c581844d0ab1773ba55968b15450 (patch)
tree538a242811716e998395c78a9cbac6ad22a446f1 /extension/react-app/src/components/PillButton.tsx
parent85826ae7e2ed5033e3756706953313d0d4490233 (diff)
downloadsncontinue-bd202df41755c581844d0ab1773ba55968b15450.tar.gz
sncontinue-bd202df41755c581844d0ab1773ba55968b15450.tar.bz2
sncontinue-bd202df41755c581844d0ab1773ba55968b15450.zip
feat: :children_crossing: more keyboard shortcuts
Diffstat (limited to 'extension/react-app/src/components/PillButton.tsx')
-rw-r--r--extension/react-app/src/components/PillButton.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/extension/react-app/src/components/PillButton.tsx b/extension/react-app/src/components/PillButton.tsx
index edef808e..5895a91c 100644
--- a/extension/react-app/src/components/PillButton.tsx
+++ b/extension/react-app/src/components/PillButton.tsx
@@ -155,6 +155,12 @@ const PillButton = (props: PillButtonProps) => {
props.onHover(false);
}
}}
+ className="pill-button"
+ onKeyDown={(e) => {
+ if (e.key === "Backspace") {
+ client?.deleteContextWithIds([props.item.description.id]);
+ }
+ }}
>
{isHovered && (
<GridDiv