UNPKG

react-garden

Version:

React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.

51 lines (46 loc) 1.68 kB
// ** React Imports import { Fragment, useState } from 'react' // ** MUI Imports import Button from '@mui/material/Button' import Dialog from '@mui/material/Dialog' import DialogTitle from '@mui/material/DialogTitle' import DialogContent from '@mui/material/DialogContent' import DialogActions from '@mui/material/DialogActions' import DialogContentText from '@mui/material/DialogContentText' const DialogConfirmation = () => { // ** State const [open, setOpen] = useState(false) const handleClickOpen = () => setOpen(true) const handleClose = () => setOpen(false) return ( <> <Button variant='outlined' onClick={handleClickOpen}> Open dialog </Button> <Dialog open={open} disableEscapeKeyDown aria-labelledby='alert-dialog-title' aria-describedby='alert-dialog-description' onClose={(event, reason) => { if (reason !== 'backdropClick') { handleClose() } }} > <DialogTitle id='alert-dialog-title'>Use Google's location service?</DialogTitle> <DialogContent> <DialogContentText id='alert-dialog-description'> Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running. </DialogContentText> </DialogContent> <DialogActions className='dialog-actions-dense'> <Button onClick={handleClose}>Disagree</Button> <Button onClick={handleClose}>Agree</Button> </DialogActions> </Dialog> </> ) } export default DialogConfirmation