Adding a fullScreen option for our Dialog component.

This commit is contained in:
Eric van der Vlist 2022-12-15 18:46:58 +01:00
parent e90e71d151
commit d71399e296
3 changed files with 10 additions and 8 deletions

View File

@ -10,6 +10,7 @@ import CloseIcon from '@suid/icons-material/Close';
const Dialog: Component<{
open: boolean;
fullScreen?: boolean;
title: JSXElement;
closeHandler: (event: any, reason?: string) => void;
children: JSXElement;
@ -19,6 +20,7 @@ const Dialog: Component<{
onClose={props.closeHandler}
open={props.open}
PaperProps={{ sx: { minWidth: '300px' } }}
fullScreen={props.fullScreen}
>
<DialogTitle
sx={{

View File

@ -1,11 +1,5 @@
import { useI18n } from '@solid-primitives/i18n';
import {
Box,
Button,
IconButton,
SvgIcon,
TextField,
} from '@suid/material';
import { Box, Button, IconButton, SvgIcon, TextField } from '@suid/material';
import { cloneDeep } from 'lodash';
import { Component, createSignal, Show } from 'solid-js';
import dispatch from '../../workers/dispatcher-main';
@ -150,7 +144,12 @@ const GpxDialog: Component<{}> = (props) => {
</SvgIcon>
</IconButton>
</div>
<Dialog open={open()} title={t('gpxDialog')} closeHandler={handleClose}>
<Dialog
open={open()}
title={t('gpxDialog')}
closeHandler={handleClose}
fullScreen={true}
>
<Box
component='form'
sx={{

View File

@ -53,6 +53,7 @@ const GpxImport: Component = () => {
open={filesToImport() !== undefined}
title={t('gpxImport')}
closeHandler={handleClose}
fullScreen
>
<Box
sx={{