96 lines
2.6 KiB
JavaScript
96 lines
2.6 KiB
JavaScript
import * as React from 'react';
|
|
import Button from '@mui/material/Button';
|
|
import Dialog from '@mui/material/Dialog';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
import ListItem from '@mui/material/ListItem';
|
|
import List from '@mui/material/List';
|
|
import Divider from '@mui/material/Divider';
|
|
import AppBar from '@mui/material/AppBar';
|
|
import Toolbar from '@mui/material/Toolbar';
|
|
import IconButton from '@mui/material/IconButton';
|
|
import Typography from '@mui/material/Typography';
|
|
import CloseIcon from '@mui/icons-material/Close';
|
|
import Slide from '@mui/material/Slide';
|
|
import Card from "@mui/material/Card";
|
|
|
|
const Transition = React.forwardRef(function Transition(props, ref) {
|
|
return <Slide direction="up" ref={ref} {...props} />;
|
|
});
|
|
|
|
export default function FullScreenDialogs() {
|
|
const [open, setOpen] = React.useState(false);
|
|
|
|
const handleClickOpen = () => {
|
|
setOpen(true);
|
|
};
|
|
|
|
const handleClose = () => {
|
|
setOpen(false);
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<Card
|
|
sx={{
|
|
boxShadow: "none",
|
|
borderRadius: "10px",
|
|
p: "25px",
|
|
mb: "15px",
|
|
}}
|
|
>
|
|
<Typography
|
|
as="h3"
|
|
sx={{
|
|
fontSize: 18,
|
|
fontWeight: 500,
|
|
mb: '10px'
|
|
}}
|
|
>
|
|
Full Screen Dialog
|
|
</Typography>
|
|
|
|
<Button variant="outlined" onClick={handleClickOpen}>
|
|
Open full-screen dialog
|
|
</Button>
|
|
|
|
<Dialog
|
|
fullScreen
|
|
open={open}
|
|
onClose={handleClose}
|
|
TransitionComponent={Transition}
|
|
>
|
|
<AppBar sx={{ position: 'relative' }}>
|
|
<Toolbar>
|
|
<IconButton
|
|
edge="start"
|
|
color="inherit"
|
|
onClick={handleClose}
|
|
aria-label="close"
|
|
>
|
|
<CloseIcon />
|
|
</IconButton>
|
|
<Typography sx={{ ml: 2, flex: 1 }} variant="h6" component="div">
|
|
Sound
|
|
</Typography>
|
|
<Button autoFocus color="inherit" onClick={handleClose}>
|
|
save
|
|
</Button>
|
|
</Toolbar>
|
|
</AppBar>
|
|
<List>
|
|
<ListItem button>
|
|
<ListItemText primary="Phone ringtone" secondary="Titania" />
|
|
</ListItem>
|
|
<Divider />
|
|
<ListItem button>
|
|
<ListItemText
|
|
primary="Default notification ringtone"
|
|
secondary="Tethys"
|
|
/>
|
|
</ListItem>
|
|
</List>
|
|
</Dialog>
|
|
</Card>
|
|
</>
|
|
);
|
|
} |