Skip to content

Commit

Permalink
WIP: add UI wireframe for new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Jamrozik committed Jul 7, 2024
1 parent dd80380 commit 2b34665
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion web/src/components/SettingsPanel/SettingsPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
/* eslint-disable max-lines-per-function */
import {
Button,
Card,
CardHeader,
Checkbox,

Check failure on line 6 in web/src/components/SettingsPanel/SettingsPanel.tsx

View workflow job for this annotation

GitHub Actions / Lint

'Checkbox' is defined but never used. Allowed unused vars must match /_/u
Divider,
List,
ListItem,
ListItemText,
Switch,
} from '@mui/material'
import { useSettingsContext, type Settings } from '../../lib/settings/Settings'
import { Label } from '../utilities/Label'

export function SettingsPanel(): React.JSX.Element {
const settings: Settings = useSettingsContext()
Expand Down Expand Up @@ -68,7 +72,47 @@ export function SettingsPanel(): React.JSX.Element {
}}
/>
</ListItem>
<Divider sx={{ marginY: 1 }} />
<ListItem>
<ListItemText id="label-list-gameSessionSize" primary="Data size" />
<Label sx={{ minWidth: 92, marginLeft: 2, textAlign: 'center' }}>
99.99 MB
</Label>
</ListItem>

<ListItem>
<ListItemText
id="switch-list-saveOnExitEnabled"
primary="Save on exit"
/>
<Switch
edge="end"
disabled={true}
checked={false}
inputProps={{
'aria-labelledby': 'switch-list-saveOnExitEnabled',
}}
/>
</ListItem>
<ListItem>
<ListItemText
id="switch-list-compressionEnabled"
primary="Compress"
/>
<Switch
edge="end"
disabled={true}
checked={false}
inputProps={{
'aria-labelledby': 'switch-list-compressionEnabled',
}}
/>
</ListItem>
<ListItem sx={{ justifyContent: 'center' }}>
<Button variant="outlined">Save data</Button>
</ListItem>
<Divider sx={{ marginY: 1 }} />
<ListItem sx={{ justifyContent: 'center' }}>
<Button
variant="outlined"
color="error"
Expand All @@ -77,7 +121,7 @@ export function SettingsPanel(): React.JSX.Element {
console.log('Cleared local storage')
}}
>
Clear local storage
Reset settings
</Button>
</ListItem>
</List>
Expand Down

0 comments on commit 2b34665

Please sign in to comment.