diff --git a/src/renderer/src/pages/home/Markdown/CodeBlock.tsx b/src/renderer/src/pages/home/Markdown/CodeBlock.tsx index 48984bcf95..6e817d6e70 100644 --- a/src/renderer/src/pages/home/Markdown/CodeBlock.tsx +++ b/src/renderer/src/pages/home/Markdown/CodeBlock.tsx @@ -82,7 +82,9 @@ const CodeBlock: React.FC = ({ children, className }) => {
- {codeCollapsible && setIsExpanded(!isExpanded)} />} + {codeCollapsible && shouldShowExpandButton && ( + setIsExpanded(!isExpanded)} /> + )} {'<' + match[1].toUpperCase() + '>'}
@@ -207,8 +209,8 @@ const CodeFooter = styled.div` const ExpandButtonWrapper = styled.div` position: relative; cursor: pointer; - height: 30px; - margin-top: -30px; + height: 25px; + margin-top: -25px; .button-text { position: absolute;