diff --git a/public/logo-dark.png b/public/logo-dark.png new file mode 100644 index 00000000..1adf4d80 Binary files /dev/null and b/public/logo-dark.png differ diff --git a/public/logo-square-dark.png b/public/logo-square-dark.png new file mode 100644 index 00000000..80b6ce96 Binary files /dev/null and b/public/logo-square-dark.png differ diff --git a/src/App.tsx b/src/App.tsx index feec7db5..e488a9ea 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -51,9 +51,14 @@ import { useTheme, } from '@mui/material'; import {DarkMode, LightMode, Monitor} from '@mui/icons-material'; -import {lightGreen, red, yellow} from '@mui/material/colors'; +import {lightGreen, red, yellow, grey} from '@mui/material/colors'; const drawerWidth: number = 240; +const darkBg1: string = '#191919'; +const darkBg2: string = '#232323'; +const darkBg3: string = '#080808'; +const darkModeText: string = '#F5F5F5'; +const darkPrimary: string = '#43468A'; interface AppBarProps extends MuiAppBarProps { open?: boolean; @@ -173,6 +178,7 @@ function Dashboard({setThemeMode}: {setThemeMode: (theme: PaletteMode) => void}) (theme.palette.mode === 'light' ? theme.palette.primary.main : darkPrimary), }}> void}) - + (theme.palette.mode === 'light' ? 'default' : darkBg2)}} + variant="permanent" + open={open}> (theme.palette.mode === 'light' ? 'default' : darkBg2), }}> void}) px: 2, textDecoration: 'none', }}> - + {useTheme().palette.mode === 'light' ? ( + + ) : ( + + )} ACCESS @@ -219,18 +233,20 @@ function Dashboard({setThemeMode}: {setThemeMode: (theme: PaletteMode) => void}) - + (theme.palette.mode === 'light' ? 'default' : darkBg2)}} component="nav"> - + (theme.palette.mode === 'light' ? 'default' : darkBg2)}} + marginTop="auto" + p={2}> - theme.palette.mode === 'light' ? theme.palette.grey[200] : theme.palette.grey[800], + backgroundColor: (theme) => (theme.palette.mode === 'light' ? theme.palette.grey[200] : '#1E1E1E'), flexGrow: 1, height: '100vh', overflow: 'auto', @@ -278,7 +294,7 @@ export default function App() { palette: { mode, primary: { - main: '#5865F2', + main: mode === 'light' ? '#5865F2' : darkPrimary, light: '#A5B2FF', }, secondary: { @@ -294,7 +310,12 @@ export default function App() { main: '#57F287', }, text: { - accent: mode === 'light' ? '#5865F2' : '#A5B2FF', + accent: mode === 'light' ? '#5865F2' : '#8385DF', + primary: mode === 'light' ? grey[900] : darkModeText, + }, + background: { + paper: mode === 'light' ? '#FFFFFF' : darkBg1, + default: mode === 'light' ? '#FFFFFF' : darkBg1, }, }, components: { @@ -315,6 +336,41 @@ export default function App() { }), }, }, + MuiButtonBase: { + styleOverrides: { + root: { + color: mode === 'light' ? 'default' : darkModeText, + }, + }, + }, + MuiButton: { + styleOverrides: { + root: { + color: mode === 'light' ? 'default' : darkModeText, + }, + }, + }, + MuiSvgIcon: { + styleOverrides: { + root: { + color: mode === 'light' ? 'default' : darkModeText, + }, + }, + }, + MuiDrawer: { + styleOverrides: { + paper: { + backgroundColor: mode === 'light' ? 'default' : darkBg2, + }, + }, + }, + MuiDialog: { + styleOverrides: { + paper: { + backgroundColor: mode === 'light' ? 'default' : darkBg3, + }, + }, + }, }, }); return createTheme(base, { diff --git a/src/components/DateRange.tsx b/src/components/DateRange.tsx index c0a76f5d..7a6ed962 100644 --- a/src/components/DateRange.tsx +++ b/src/components/DateRange.tsx @@ -116,7 +116,7 @@ function ButtonField(props: ButtonFieldProps) { color: theme.palette.text.secondary, position: 'absolute', // HACK: Match dark mode MUI Paper at elevation 1, which is where this is currently used - backgroundColor: theme.palette.mode === 'light' ? theme.palette.background.default : '#1E1E1E', + backgroundColor: theme.palette.mode === 'light' ? theme.palette.background.default : '#242424', marginLeft: '5px', paddingX: '3px', zIndex: '2', diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 6d34ef91..129ec9cb 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -18,6 +18,8 @@ import PeopleLeadIcon from '@mui/icons-material/ContentPaste'; import FAQIcon from '@mui/icons-material/TipsAndUpdates'; import UserIcon from '@mui/icons-material/AccountBox'; +import {useTheme} from '@mui/material'; + const sections: Record = { // section shorthand --> [guide title, button title, icon] general: ['Welcome to Access!', 'Overview', ], @@ -150,6 +152,7 @@ function AccordionMaker(props: AccordionMakerProps) { export default function Home() { const [whichAccordion, setWhichAccordion] = React.useState('general'); // general, users, people-lead, app owner, admin, faq + const theme = useTheme(); return ( @@ -160,14 +163,11 @@ export default function Home() { - + {theme.palette.mode === 'light' ? ( + + ) : ( + + )}