summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/StyledMarkdownPreview.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'extension/react-app/src/components/StyledMarkdownPreview.tsx')
-rw-r--r--extension/react-app/src/components/StyledMarkdownPreview.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/extension/react-app/src/components/StyledMarkdownPreview.tsx b/extension/react-app/src/components/StyledMarkdownPreview.tsx
index f77360b2..78d4234c 100644
--- a/extension/react-app/src/components/StyledMarkdownPreview.tsx
+++ b/extension/react-app/src/components/StyledMarkdownPreview.tsx
@@ -7,8 +7,12 @@ import {
vscForeground,
} from ".";
import MarkdownPreview from "@uiw/react-markdown-preview";
+import { getFontSize } from "../util";
-const StyledMarkdownPreview = styled(MarkdownPreview)<{ light?: boolean }>`
+const StyledMarkdownPreview = styled(MarkdownPreview)<{
+ light?: boolean;
+ fontSize?: number;
+}>`
pre {
background-color: ${(props) =>
props.light ? vscBackground : secondaryDark};
@@ -34,7 +38,7 @@ const StyledMarkdownPreview = styled(MarkdownPreview)<{ light?: boolean }>`
background-color: ${(props) => (props.light ? "transparent" : vscBackground)};
font-family: "Lexend", sans-serif;
- font-size: 13px;
+ font-size: ${(props) => props.fontSize || getFontSize()}px;
padding: 8px;
color: ${vscForeground};
`;