Skip to content

Commit 4244b65

Browse files
committed
feat: Move theme switcher to the settings page.
1 parent 3b1fc5e commit 4244b65

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/components/SettingsComponent.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
Typography
1212
} from '@mui/material';
1313
import { useLocalStorageState } from '@toolpad/core/useLocalStorageState';
14+
import { ThemeSwitcher } from '@toolpad/core/DashboardLayout';
1415
import React from 'react';
1516

1617
import {
@@ -111,6 +112,17 @@ export default function SettingsComponent({ settings, setSettings }) {
111112

112113
return (
113114
<Stack direction="column" spacing={1} alignItems="flex-start">
115+
<Box sx={{
116+
display: 'flex',
117+
alignItems: 'center',
118+
justifyContent: 'space-between',
119+
padding: 0.5,
120+
width: '100%',
121+
boxSizing: 'border-box'
122+
}} >
123+
Light/Dark theme
124+
<ThemeSwitcher />
125+
</Box>
114126
{checkboxOptions.map(({ key, label, tooltip }) => (
115127
<Box
116128
key={key}

src/components/ToolbarActions.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
Stack,
1212
Tooltip
1313
} from '@mui/material';
14-
import { ThemeSwitcher } from '@toolpad/core/DashboardLayout';
1514
import React from 'react';
1615

1716
export default function ToolbarActions({
@@ -28,7 +27,6 @@ export default function ToolbarActions({
2827
<SelectTargetButton onClick={onSelectTargetClick} />
2928
<RefreshWindsButton onClick={onRefreshWindsClick} fetching={fetching} />
3029
<Divider orientation="vertical" flexItem />
31-
<ThemeSwitcher />
3230
</Stack>;
3331
}
3432

0 commit comments

Comments
 (0)