diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-12 10:50:33 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-12 10:50:33 -0700 |
commit | 792b65745b89bb59802294357378113493d25b63 (patch) | |
tree | 1d038ca5e1ac837fa704b454136f597bdd02797d /extension/react-app/src/components/StepContainer.tsx | |
parent | c66f39173bec7e45955dc8b96ae6c44ed5bdc162 (diff) | |
download | sncontinue-792b65745b89bb59802294357378113493d25b63.tar.gz sncontinue-792b65745b89bb59802294357378113493d25b63.tar.bz2 sncontinue-792b65745b89bb59802294357378113493d25b63.zip |
calculate diff and highlight changes
Diffstat (limited to 'extension/react-app/src/components/StepContainer.tsx')
-rw-r--r-- | extension/react-app/src/components/StepContainer.tsx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx index 8ea54325..fb0143b5 100644 --- a/extension/react-app/src/components/StepContainer.tsx +++ b/extension/react-app/src/components/StepContainer.tsx @@ -84,6 +84,15 @@ const OnHoverDiv = styled.div` animation: ${appear} 0.3s ease-in-out; `; +const MarkdownPre = styled.pre` + background-color: ${secondaryDark}; + padding: 10px; + border-radius: ${defaultBorderRadius}; + border: 0.5px solid white; +`; + +const MarkdownCode = styled.code``; + function StepContainer(props: StepContainerProps) { const [open, setOpen] = useState( typeof props.open === "undefined" ? true : props.open @@ -182,7 +191,19 @@ function StepContainer(props: StepContainerProps) { {props.historyNode.observation.error as string} </pre> ) : ( - <ReactMarkdown key={1} className="overflow-scroll"> + <ReactMarkdown + key={1} + className="overflow-scroll" + components={{ + pre: ({ node, ...props }) => { + return ( + <CodeBlock + children={props.children[0] as string} + ></CodeBlock> + ); + }, + }} + > {props.historyNode.step.description as any} </ReactMarkdown> )} |