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/pages/settings.tsx | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

(limited to 'extension/react-app/src/pages/settings.tsx')

diff --git a/extension/react-app/src/pages/settings.tsx b/extension/react-app/src/pages/settings.tsx
index 4bd51163..cb269d7b 100644
--- a/extension/react-app/src/pages/settings.tsx
+++ b/extension/react-app/src/pages/settings.tsx
@@ -6,18 +6,18 @@ import { useNavigate } from "react-router-dom";
 import { ContinueConfig } from "../../../schema/ContinueConfig";
 import {
   Button,
+  NumberInput,
   TextArea,
   lightGray,
   secondaryDark,
   vscBackground,
 } from "../components";
 import styled from "styled-components";
-import { ArrowLeftIcon, Squares2X2Icon } from "@heroicons/react/24/outline";
+import { ArrowLeftIcon } from "@heroicons/react/24/outline";
 import Loader from "../components/Loader";
 import InfoHover from "../components/InfoHover";
 import { FormProvider, useForm } from "react-hook-form";
-import { setDialogMessage, setShowDialog } from "../redux/slices/uiStateSlice";
-import KeyboardShortcutsDialog from "../components/dialogs/KeyboardShortcuts";
+import { getFontSize } from "../util";
 
 const Hr = styled.hr`
   border: 0.5px solid ${lightGray};
@@ -219,6 +219,24 @@ function Settings() {
           )}
         </form>
 
+        <hr />
+
+        <div className="px-2">
+          <h3>Appearance</h3>
+
+          <p>Font Size</p>
+          <NumberInput
+            type="number"
+            min="8"
+            max="48"
+            step="1"
+            defaultValue={getFontSize()}
+            onChange={(e) => {
+              localStorage.setItem("fontSize", e.target.value);
+            }}
+          />
+        </div>
+
         <div className="flex gap-2 justify-end px-4">
           <CancelButton
             onClick={() => {
-- 
cgit v1.2.3-70-g09d2

