From 3615689765c156703be5e00bdaf37a2d7ba6ab6f Mon Sep 17 00:00:00 2001 From: praneetha1844 Date: Wed, 17 Jul 2024 10:15:19 +0530 Subject: [PATCH] Added support for orange theme --- .../src/components/ThemeProvider.tsx | 11 +- .../src/components/ThemeSelector.tsx | 8 + .../src/style/_theme-orange.scss | 142 ++++++++++++++++++ .../src/style/index.scss | 4 + atcoder-problems-frontend/src/style/theme.ts | 2 +- 5 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 atcoder-problems-frontend/src/style/_theme-orange.scss diff --git a/atcoder-problems-frontend/src/components/ThemeProvider.tsx b/atcoder-problems-frontend/src/components/ThemeProvider.tsx index 99126f0bc..a8bd3221c 100644 --- a/atcoder-problems-frontend/src/components/ThemeProvider.tsx +++ b/atcoder-problems-frontend/src/components/ThemeProvider.tsx @@ -1,9 +1,15 @@ import React from "react"; import { Helmet } from "react-helmet"; import { useLocalStorage } from "../utils/LocalStorage"; -import { ThemeLight, ThemeDark, ThemePurple, Theme } from "../style/theme"; +import { + ThemeLight, + ThemeDark, + ThemePurple, + ThemeOrange, + Theme, +} from "../style/theme"; -type RenderedThemeId = "light" | "dark" | "purple"; +type RenderedThemeId = "light" | "dark" | "purple" | "orange"; type ThemeId = RenderedThemeId | "auto"; type ThemeContextProps = [ThemeId, (newThemeId: ThemeId) => void]; @@ -11,6 +17,7 @@ const THEME_LIST = { light: ThemeLight, dark: ThemeDark, purple: ThemePurple, + orange: ThemeOrange, }; export const ThemeContext = React.createContext([ diff --git a/atcoder-problems-frontend/src/components/ThemeSelector.tsx b/atcoder-problems-frontend/src/components/ThemeSelector.tsx index 27eba2448..3e153bf6f 100644 --- a/atcoder-problems-frontend/src/components/ThemeSelector.tsx +++ b/atcoder-problems-frontend/src/components/ThemeSelector.tsx @@ -52,6 +52,14 @@ export const ThemeSelector: React.FC = () => { Purple (Beta) + setThemeId("orange")} + > + + Orange +