mirror of
https://gitlab.aliens-lyon.fr/encartes/web-interface.git
synced 2026-03-18 23:21:05 +01:00
About dialog
This commit is contained in:
parent
8c13fd68fc
commit
02584c6a82
37
src/App.js
37
src/App.js
@ -6,6 +6,12 @@ import Typography from '@mui/material/Typography';
|
|||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import TextField from '@mui/material/TextField';
|
import TextField from '@mui/material/TextField';
|
||||||
import Container from '@mui/material/Container';
|
import Container from '@mui/material/Container';
|
||||||
|
import Dialog from '@mui/material/Dialog';
|
||||||
|
import DialogActions from '@mui/material/DialogActions';
|
||||||
|
import DialogContent from '@mui/material/DialogContent';
|
||||||
|
import DialogContentText from '@mui/material/DialogContentText';
|
||||||
|
import DialogTitle from '@mui/material/DialogTitle';
|
||||||
|
|
||||||
|
|
||||||
function RoomResearch() {
|
function RoomResearch() {
|
||||||
return <>
|
return <>
|
||||||
@ -27,6 +33,16 @@ function RoomResearch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TopBar() {
|
function TopBar() {
|
||||||
|
const [openAboutModal, setOpenAboutModal] = React.useState(false);
|
||||||
|
|
||||||
|
const handleOpenAboutModal = () => {
|
||||||
|
setOpenAboutModal(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCloseAboutModal = () => {
|
||||||
|
setOpenAboutModal(false);
|
||||||
|
};
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
<Box sx={{ flexGrow: 1 }}>
|
<Box sx={{ flexGrow: 1 }}>
|
||||||
<AppBar position="static">
|
<AppBar position="static">
|
||||||
@ -36,10 +52,29 @@ function TopBar() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Button color="inherit">Choix d'une carte</Button>
|
<Button color="inherit">Choix d'une carte</Button>
|
||||||
<Button color="inherit">Recherche d'une salle</Button>
|
<Button color="inherit">Recherche d'une salle</Button>
|
||||||
<Button color="inherit">À propos</Button>
|
<Button color="inherit" onClick={handleOpenAboutModal}>À propos</Button>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
<Dialog
|
||||||
|
open={openAboutModal}
|
||||||
|
onClose={handleCloseAboutModal}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<DialogTitle id="alert-dialog-title">
|
||||||
|
{"À propos d'ENcarteS"}
|
||||||
|
</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
<DialogContentText id="alert-dialog-description">
|
||||||
|
ENcarteS permet de rechercher les salles de l'ENS !
|
||||||
|
</DialogContentText>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
<Button onClick={handleCloseAboutModal}>Ok</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user