From b833318ce3f020ffedd2fb4674b0fb85bce3aae3 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 6 May 2024 12:10:16 -0700 Subject: [PATCH 1/2] Added a theme and theme provider --- Client/src/Utils/Theme.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Client/src/Utils/Theme.js diff --git a/Client/src/Utils/Theme.js b/Client/src/Utils/Theme.js new file mode 100644 index 000000000..5ad9df5c8 --- /dev/null +++ b/Client/src/Utils/Theme.js @@ -0,0 +1,18 @@ +import { createTheme } from "@mui/material"; + +// Colors for MUI theme +const secondaryMain = "#475467"; +const tertiaryMain = "#475467"; + +const theme = createTheme({ + palette: { + secondary: { + main: secondaryMain, + }, + tertiary: { + main: tertiaryMain, + }, + }, +}); + +export default theme; From b2d832672d1d88ab52b18b541f779a9cf7367f26 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 6 May 2024 12:19:06 -0700 Subject: [PATCH 2/2] Wrapped app in theme provider --- Client/src/main.jsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Client/src/main.jsx b/Client/src/main.jsx index 8cb8bd9ec..b39e60580 100644 --- a/Client/src/main.jsx +++ b/Client/src/main.jsx @@ -1,13 +1,16 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App.jsx' -import './index.css' -import { BrowserRouter as Router, HashRouter } from 'react-router-dom' - -ReactDOM.createRoot(document.getElementById('root')).render( +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App.jsx"; +import "./index.css"; +import { BrowserRouter as Router, HashRouter } from "react-router-dom"; +import theme from "./Utils/Theme.js"; +import { ThemeProvider } from "@mui/material"; +ReactDOM.createRoot(document.getElementById("root")).render( - - - - , -) + + + + + + +);