fixed some theming stuff, buttons highlight correctly now
This commit is contained in:
parent
563fc8ed41
commit
c04b9b0adb
4 changed files with 29 additions and 10 deletions
|
|
@ -9,7 +9,7 @@ import { Theme, ThemeProvider } from '@mui/material'
|
||||||
import { CreateTheme } from '../theme/theme'
|
import { CreateTheme } from '../theme/theme'
|
||||||
import { getThemeType, setThemeType } from '../theme/themeType'
|
import { getThemeType, setThemeType } from '../theme/themeType'
|
||||||
|
|
||||||
function AuthHTTPWrapper() {
|
function App() {
|
||||||
const [token, setToken] = useState<string | undefined>(undefined)
|
const [token, setToken] = useState<string | undefined>(undefined)
|
||||||
const [palette, setPalette] = useState<Theme>(CreateTheme(getThemeType()));
|
const [palette, setPalette] = useState<Theme>(CreateTheme(getThemeType()));
|
||||||
|
|
||||||
|
|
@ -56,4 +56,4 @@ function AuthHTTPWrapper() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AuthHTTPWrapper
|
export default App
|
||||||
|
|
@ -82,14 +82,9 @@ interface Props {
|
||||||
export default function Header(props: Props) {
|
export default function Header(props: Props) {
|
||||||
|
|
||||||
const { sideIsOpen, openSide, toggleTheme } = props;
|
const { sideIsOpen, openSide, toggleTheme } = props;
|
||||||
// const { mode, setMode } = useColorScheme();
|
|
||||||
|
|
||||||
const themeType = useThemeType();
|
const themeType = useThemeType();
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
|
|
||||||
console.log(getSignatureColour())
|
|
||||||
console.log(getSignatureAccentColour())
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppBar position="fixed" className={classes.appBar}>
|
<AppBar position="fixed" className={classes.appBar}>
|
||||||
<Toolbar disableGutters className={classes.toolbar}>
|
<Toolbar disableGutters className={classes.toolbar}>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { StrictMode } from 'react'
|
import { StrictMode } from 'react'
|
||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
import './index.css'
|
import './index.css'
|
||||||
import AuthHTTPWrapper from './AuthHTTPWrapper.tsx'
|
import App from './App.tsx'
|
||||||
|
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
<AuthHTTPWrapper />
|
<App />
|
||||||
</StrictMode>,
|
</StrictMode>,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,12 @@ function options(themeType: "light" | "dark"): ThemeOptions {
|
||||||
|
|
||||||
const signature = getSignatureColour();
|
const signature = getSignatureColour();
|
||||||
const accent = getSignatureAccentColour();
|
const accent = getSignatureAccentColour();
|
||||||
|
const bg = generateBackgroundShades(Colours.grey[800], themeType)
|
||||||
return {
|
return {
|
||||||
palette: {
|
palette: {
|
||||||
primary: Colours[getPrimaryColour() as keyof typeof Colours],
|
primary: Colours[getPrimaryColour() as keyof typeof Colours],
|
||||||
secondary: Colours[getSecondaryColour() as keyof typeof Colours],
|
secondary: Colours[getSecondaryColour() as keyof typeof Colours],
|
||||||
background: generateBackgroundShades(Colours.grey[800], themeType),
|
background: bg,
|
||||||
mode: themeType,
|
mode: themeType,
|
||||||
bxt: {
|
bxt: {
|
||||||
primaryBlue: "#005bb0",
|
primaryBlue: "#005bb0",
|
||||||
|
|
@ -175,6 +176,29 @@ function options(themeType: "light" | "dark"): ThemeOptions {
|
||||||
checked: {},
|
checked: {},
|
||||||
track: {}
|
track: {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
MuiButton: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
'& .MuiTouchRipple-root': {
|
||||||
|
color: accent, // Customize ripple color here
|
||||||
|
// color: "white"
|
||||||
|
},
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: "rgba(125, 125, 125, 0.2)"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MuiListItemButton: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
'& .MuiTouchRipple-root': {
|
||||||
|
color: accent, // Customize ripple color here
|
||||||
|
// color: "white"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} as ThemeOptions;
|
} as ThemeOptions;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue