import * as React from
'react'
;
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'
;
function
SimpleDialog(props) {
const { onClose, open } = props;
const handleClose = () => { onClose(); };
return
(
<Dialog onClose={handleClose} open={open}>
<DialogTitle style={{ color:
'green'
}}>
DSA Self Paced Course</DialogTitle>
<DialogContent dividers>
Most popular course on DSA trusted by
over 75,000 students! Built
with
years
of experience by industry experts and
gives you a complete package of video
lectures, practice problems, quizzes,
discussion forums and contests.<br />
Start Today !
</DialogContent>
<DialogActions disableSpacing={
true
}>
<Button variant=
"outlined"
color=
"success"
>
Enroll Now
</Button>
</DialogActions>
</Dialog>
);
}
export
default
function
SimpleDialogDemo() {
const [open, setOpen] = React.useState(
false
);
const handleClickOpen = () => { setOpen(
true
); };
const handleClose = () => { setOpen(
false
); };
return
(
<div style={{ margin: 100, textAlign:
"center"
}}>
<h1 style={{ color:
'green'
}}>
GeeksforGeeks
</h1>
<h3><u>React MUI DialogActions API</u></h3>
<br />
<Button variant=
"outlined"
onClick={handleClickOpen}>
DSA Self Paced Course
</Button>
<SimpleDialog open={open}
onClose={handleClose} />
</div>
);
}