From 8aff802faa3c464150258203d7b6141f0f53fcf4 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:07:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(App):=20use=20cus?= =?UTF-8?q?tom=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.tsx | 9 ++++++++- src/style/theme.ts | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/style/theme.ts diff --git a/src/main.tsx b/src/main.tsx index c4fc9bb..8e95cd9 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,10 +1,17 @@ import React from 'react' import ReactDOM from 'react-dom/client' +import { ThemeProvider } from '@mui/material/styles' +import { CssBaseline } from '@mui/material' + import App from './App.tsx' +import theme from 'style/theme.ts' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( - + + + + ) diff --git a/src/style/theme.ts b/src/style/theme.ts new file mode 100644 index 0000000..cdd7f24 --- /dev/null +++ b/src/style/theme.ts @@ -0,0 +1,20 @@ +import { createTheme } from '@mui/material/styles' + +// A custom theme for this app +const theme = createTheme({ + palette: { + mode: 'dark', + primary: { + main: '#e44c65', + }, + secondary: { + main: '#3f51b5', + }, + background: { + default: '#101018', + paper: '#1c1d26', + }, + }, +}) + +export default theme