Skip to content

Commit a72c0cc

Browse files
committed
refactor: removed light mode
1 parent cd673d0 commit a72c0cc

File tree

7 files changed

+6
-156
lines changed

7 files changed

+6
-156
lines changed

src/components/editor/editor.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { useCallback } from "react";
22
import { useStore } from "@/store/useStore";
3-
import { useTheme } from "@/hooks/useTheme";
43

54
import MonacoEditor from "@monaco-editor/react";
65
import Loader from "@/components/loader";
76

87
export default function Editor() {
98
const { code, setCode } = useStore();
10-
const { theme } = useTheme();
119

1210
const handleCodeOnChange = useCallback(
1311
(value: string | undefined) => {
@@ -22,7 +20,7 @@ export default function Editor() {
2220
<div className="flex h-full flex-col items-center justify-center bg-background pt-4 text-foreground">
2321
<MonacoEditor
2422
defaultLanguage="python"
25-
theme={theme === "dark" ? "vs-dark" : "light"}
23+
theme={"vs-dark"}
2624
value={code}
2725
onChange={handleCodeOnChange}
2826
loading={<Loader text="Loading Editor" />}

src/components/nav-buttons.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { useStore } from "@/store/useStore";
33

44
import { Button } from "./ui/button";
55
import Settings from "./settings";
6-
import ModeToggle from "./theme/mode-toggle";
76

87
import {
98
ReplaceIcon,
@@ -64,9 +63,8 @@ const ButtonsNav = () => {
6463
label="Toggle Direction"
6564
/>
6665
</div>
67-
<div className="flex items-center gap-1 md:gap-2">
66+
<div className="flex items-center">
6867
<Settings />
69-
<ModeToggle />
7068
</div>
7169
</div>
7270
</nav>

src/components/theme/mode-toggle.tsx

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/components/theme/theme-provider.tsx

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/globals.css

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,6 @@
44

55
@layer base {
66
:root {
7-
--background: 0 0% 100%;
8-
--foreground: 222.2 84% 4.9%;
9-
--card: 0 0% 100%;
10-
--card-foreground: 222.2 84% 4.9%;
11-
--popover: 0 0% 100%;
12-
--popover-foreground: 222.2 84% 4.9%;
13-
--primary: 222.2 47.4% 11.2%;
14-
--primary-foreground: 210 40% 98%;
15-
--secondary: 210 40% 96.1%;
16-
--secondary-foreground: 222.2 47.4% 11.2%;
17-
--muted: 210 40% 96.1%;
18-
--muted-foreground: 215.4 16.3% 46.9%;
19-
--accent: 210 40% 96.1%;
20-
--accent-foreground: 222.2 47.4% 11.2%;
21-
--destructive: 0 84.2% 60.2%;
22-
--destructive-foreground: 210 40% 98%;
23-
--border: 214.3 31.8% 91.4%;
24-
--input: 214.3 31.8% 91.4%;
25-
--ring: 222.2 84% 4.9%;
26-
--radius: 0.5rem;
27-
--chart-1: 12 76% 61%;
28-
--chart-2: 173 58% 39%;
29-
--chart-3: 197 37% 24%;
30-
--chart-4: 43 74% 66%;
31-
--chart-5: 27 87% 67%;
32-
}
33-
34-
.dark {
357
--background: 222.2 84% 4.9%;
368
--foreground: 210 40% 98%;
379
--card: 222.2 84% 4.9%;
@@ -51,11 +23,7 @@
5123
--border: 217.2 32.6% 17.5%;
5224
--input: 217.2 32.6% 17.5%;
5325
--ring: 212.7 26.8% 83.9;
54-
--chart-1: 220 70% 50%;
55-
--chart-2: 160 60% 45%;
56-
--chart-3: 30 80% 55%;
57-
--chart-4: 280 65% 60%;
58-
--chart-5: 340 75% 55%;
26+
--radius: 0.5rem;
5927
}
6028
}
6129

@@ -96,12 +64,6 @@
9664
--scrollbar-thumb: hsl(var(--muted-foreground) / 0.5);
9765
--scrollbar-thumb-hover: hsl(var(--muted-foreground) / 0.7);
9866
}
99-
100-
.dark {
101-
--scrollbar-track: hsl(var(--secondary));
102-
--scrollbar-thumb: hsl(var(--muted-foreground) / 0.5);
103-
--scrollbar-thumb-hover: hsl(var(--muted-foreground) / 0.7);
104-
}
10567
}
10668

10769
.markdown-body pre {
@@ -118,10 +80,10 @@
11880
display: none;
11981
}
12082

121-
[class="dark"] .monaco-editor-background {
83+
.monaco-editor-background {
12284
background-color: hsl(var(--background)) !important;
12385
}
12486

125-
[class="dark"] .margin-view-overlays {
87+
.margin-view-overlays {
12688
background-color: hsl(var(--background)) !important;
12789
}

src/hooks/useTheme.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/main.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ import ReactDOM from "react-dom/client";
33
import "./globals.css";
44

55
import App from "./App.tsx";
6-
import ThemeProvider from "@/components/theme/theme-provider";
76

87
ReactDOM.createRoot(document.getElementById("root")!).render(
98
<React.StrictMode>
10-
<ThemeProvider defaultTheme="dark" storageKey="theme">
11-
<App />
12-
</ThemeProvider>
9+
<App />
1310
</React.StrictMode>
1411
);

0 commit comments

Comments
 (0)