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 | 36f3845a18ed65ff6784b99cb34d9f6c4a7e0143 (patch) | |
tree | 1cf0c19438129b5fd6ba802da3397f3514c35ec4 /extension/react-app/src/components/PillButton.tsx | |
parent | bf34e1d6a01214a6977a2932b4ee2b413d524957 (diff) | |
download | sncontinue-36f3845a18ed65ff6784b99cb34d9f6c4a7e0143.tar.gz sncontinue-36f3845a18ed65ff6784b99cb34d9f6c4a7e0143.tar.bz2 sncontinue-36f3845a18ed65ff6784b99cb34d9f6c4a7e0143.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> ); }; |