diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-05 01:04:33 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-05 01:04:33 -0700 |
commit | 8f080c4d2447e3eb66db448c08324ee71614709e (patch) | |
tree | 24d45ee5b65637469ecbf685478d32ddbf8f0d90 /extension/react-app/src/components/PillButton.tsx | |
parent | 2b8f7b079bf6335b53c0d08f1c639bb316d5fc4c (diff) | |
download | sncontinue-8f080c4d2447e3eb66db448c08324ee71614709e.tar.gz sncontinue-8f080c4d2447e3eb66db448c08324ee71614709e.tar.bz2 sncontinue-8f080c4d2447e3eb66db448c08324ee71614709e.zip |
highlighted code improvements
Diffstat (limited to 'extension/react-app/src/components/PillButton.tsx')
-rw-r--r-- | extension/react-app/src/components/PillButton.tsx | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/extension/react-app/src/components/PillButton.tsx b/extension/react-app/src/components/PillButton.tsx index 2352c3ad..5a02c6b2 100644 --- a/extension/react-app/src/components/PillButton.tsx +++ b/extension/react-app/src/components/PillButton.tsx @@ -15,6 +15,8 @@ const Button = styled.button` background-color: white; color: black; } + + cursor: pointer; `; interface PillButtonProps { @@ -39,26 +41,13 @@ const PillButton = (props: PillButtonProps) => { props.onHover(false); } }} + onClick={() => { + if (props.onDelete) { + props.onDelete(); + } + }} > - <div - style={{ display: "grid", gridTemplateColumns: "1fr auto", gap: "4px" }} - > - <span - style={{ - cursor: "pointer", - color: "red", - borderRight: "1px solid black", - paddingRight: "4px", - }} - onClick={() => { - props.onDelete?.(); - props.onHover?.(false); - }} - > - <XMark style={{ padding: "0px" }} size="1.2em" strokeWidth="2px" /> - </span> - <span>{props.title}</span> - </div> + {props.title} </Button> ); }; |