diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-24 17:47:37 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-24 17:47:37 -0700 |
commit | 8141e205bae7e5e7537a721ca21ea7b6024ffca7 (patch) | |
tree | 31f9fa210981a47697b65287a080114c897ceb90 /extension/react-app/src/components/PillButton.tsx | |
parent | 8c7ad065810a867c70d5a948bb54d94c44b6090a (diff) | |
download | sncontinue-8141e205bae7e5e7537a721ca21ea7b6024ffca7.tar.gz sncontinue-8141e205bae7e5e7537a721ca21ea7b6024ffca7.tar.bz2 sncontinue-8141e205bae7e5e7537a721ca21ea7b6024ffca7.zip |
file context provider and hovering niceties
Diffstat (limited to 'extension/react-app/src/components/PillButton.tsx')
-rw-r--r-- | extension/react-app/src/components/PillButton.tsx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/extension/react-app/src/components/PillButton.tsx b/extension/react-app/src/components/PillButton.tsx index af4263af..660ede09 100644 --- a/extension/react-app/src/components/PillButton.tsx +++ b/extension/react-app/src/components/PillButton.tsx @@ -1,8 +1,9 @@ -import { useContext, useEffect, useState } from "react"; +import { useContext, useEffect, useRef, useState } from "react"; import styled from "styled-components"; import { StyledTooltip, defaultBorderRadius, + lightGray, secondaryDark, vscBackground, vscForeground, @@ -96,12 +97,19 @@ const PillButton = (props: PillButtonProps) => { <> <b>{props.item.description.name}</b>:{" "} {props.item.description.description} - <StyledMarkdownPreview - source={`\`\`\`\n${props.item.content}\n\`\`\``} - wrapperElement={{ - "data-color-mode": "dark", - }} - /> + <pre> + <code + style={{ + fontSize: "10px", + backgroundColor: vscBackground, + color: vscForeground, + whiteSpace: "pre-wrap", + wordWrap: "break-word", + }} + > + {props.item.content} + </code> + </pre> </> ) ); @@ -178,6 +186,7 @@ const PillButton = (props: PillButtonProps) => { backgroundColor={"#cc000055"} onClick={() => { client?.deleteContextWithIds([props.item.description.id]); + dispatch(setBottomMessageCloseTimeout(undefined)); }} > <Trash style={{ margin: "auto" }} width="1.6em"></Trash> |