mirror of
https://github.com/peridotbuild/peridot.git
synced 2024-12-03 18:16:25 +00:00
Add peridotDarkTheme and switch to it by default
This commit is contained in:
parent
bfa41e2970
commit
d82dfebff9
@ -16,7 +16,10 @@
|
||||
|
||||
import React from 'react';
|
||||
import { createTheme, ThemeOptions } from '@mui/material/styles';
|
||||
import { Link as RouterLink, LinkProps as RouterLinkProps } from 'react-router-dom';
|
||||
import {
|
||||
Link as RouterLink,
|
||||
LinkProps as RouterLinkProps,
|
||||
} from 'react-router-dom';
|
||||
import { LinkProps } from '@mui/material/Link';
|
||||
|
||||
const LinkBehavior = React.forwardRef<
|
||||
@ -52,3 +55,9 @@ export const peridotThemeOptions: ThemeOptions = {
|
||||
};
|
||||
|
||||
export const peridotTheme = createTheme(peridotThemeOptions);
|
||||
export const peridotDarkTheme = createTheme({
|
||||
...peridotThemeOptions,
|
||||
palette: {
|
||||
mode: 'dark',
|
||||
},
|
||||
});
|
||||
|
@ -37,7 +37,7 @@ export const App = () => {
|
||||
return (
|
||||
<Box sx={{ display: 'flex' }}>
|
||||
<AppBar
|
||||
elevation={0}
|
||||
elevation={5}
|
||||
position="fixed"
|
||||
sx={{ zIndex: (theme: Theme) => theme.zIndex.drawer + 1 }}
|
||||
>
|
||||
|
@ -29,9 +29,9 @@ import {
|
||||
|
||||
export const Workers = () => {
|
||||
return (
|
||||
<Box sx={{p: 1.5, width: '100%'}}>
|
||||
<Box sx={{p: 1.5, px: 3, width: '100%'}}>
|
||||
<Box sx={{ mb: 2, ml: 'auto', textAlign: 'right' }}>
|
||||
<Button href="/workers/create" variant="contained" size="small">
|
||||
<Button href="/workers/create" variant="outlined" size="small">
|
||||
Create a new worker
|
||||
</Button>
|
||||
</Box>
|
||||
|
@ -33,7 +33,7 @@ export const App = () => {
|
||||
return (
|
||||
<Box sx={{ display: 'flex' }}>
|
||||
<AppBar
|
||||
elevation={0}
|
||||
elevation={5}
|
||||
position="fixed"
|
||||
sx={{ zIndex: (theme: Theme) => theme.zIndex.drawer + 1 }}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user