From 4ea176007d2228364d4d3fa4519898047cef988f Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Sun, 24 Sep 2023 11:27:24 -0700
Subject: feat: :lipstick: setting to change font size

---
 extension/react-app/src/components/StyledMarkdownPreview.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'extension/react-app/src/components/StyledMarkdownPreview.tsx')

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};
 `;
-- 
cgit v1.2.3-70-g09d2

