This commit is contained in:
seb
2026-10-15 00:45:05 +02:00
parent 6e0b72b34b
commit bcd61fcf5e
5 changed files with 145 additions and 73 deletions

View File

@@ -15,6 +15,8 @@ import {
NAV_ITEM_ACTIVE_TEXT,
} from '../../colors';
import { isTouchDevice } from '../../utils/touch';
const nav = {
background: NAV_BACKGROUND,
backgroundColor: NAV_SURFACE,
@@ -33,6 +35,7 @@ const nav = {
export const defaultThemeId = 'default';
export function createDefaultTheme() {
const isTouch = isTouchDevice();
return createTheme({
palette: {
mode: 'light',
@@ -47,11 +50,13 @@ export function createDefaultTheme() {
MuiModal: {
defaultProps: {
disableScrollLock: true,
disableAutoFocus: isTouch,
},
},
MuiDialog: {
defaultProps: {
disableScrollLock: true,
disableAutoFocus: isTouch,
},
},
MuiMenu: {
@@ -91,6 +96,7 @@ export function createDefaultTheme() {
defaultProps: {
transitionDuration: 0,
disableScrollLock: true,
disableAutoFocus: isTouch,
},
},
},