parent
ad59726ceb
commit
43a4ee2d60
6 changed files with 164 additions and 90 deletions
@ -0,0 +1,39 @@ |
||||
import * as React from "react"; |
||||
import Button from "@mui/material/Button"; |
||||
import Dialog from "@mui/material/Dialog"; |
||||
import DialogActions from "@mui/material/DialogActions"; |
||||
import DialogContent from "@mui/material/DialogContent"; |
||||
import DialogContentText from "@mui/material/DialogContentText"; |
||||
|
||||
export default function AlertDialog({ open, setOpen, text }) { |
||||
return ( |
||||
<div className="dialog"> |
||||
<Dialog |
||||
open={open} |
||||
onClose={() => setOpen(false)} |
||||
aria-labelledby="alert-dialog-title" |
||||
aria-describedby="alert-dialog-description" |
||||
> |
||||
{/* <DialogTitle id="alert-dialog-title"> |
||||
{"Use Google's location service?"} |
||||
</DialogTitle> */} |
||||
<div className='dialog-box'> |
||||
<DialogContent> |
||||
<DialogContentText id="alert-dialog-description"> |
||||
<p className="dialog-text">{text}</p> |
||||
</DialogContentText> |
||||
</DialogContent> |
||||
<DialogActions> |
||||
<button |
||||
className="dialog-submit" |
||||
onClick={() => setOpen(false)} |
||||
autoFocus |
||||
> |
||||
متوجه شدم! |
||||
</button> |
||||
</DialogActions> |
||||
</div> |
||||
</Dialog> |
||||
</div> |
||||
); |
||||
} |
@ -0,0 +1,15 @@ |
||||
.dialog{ |
||||
&-text{ |
||||
color: white; |
||||
font-family: numeralLight; |
||||
} |
||||
&-submit{ |
||||
background-color: inherit; |
||||
border: none; |
||||
color: $green; |
||||
font-family: numeralLight; |
||||
} |
||||
&-box{ |
||||
background-color: rgba($red, 0.2); |
||||
} |
||||
} |
Loading…
Reference in new issue