Login / Register / SideMenu / Fixes
This commit is contained in:
69
src/components/Dialogs/RegulaminDialog.js
Normal file
69
src/components/Dialogs/RegulaminDialog.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import React from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||
import DialogContent from "@material-ui/core/DialogContent";
|
||||
import Dialog from "@material-ui/core/Dialog";
|
||||
import Divider from "@material-ui/core/Divider";
|
||||
import IconButton from "@material-ui/core/IconButton";
|
||||
import CloseIcon from "@material-ui/icons/Close";
|
||||
import Paper from "@material-ui/core/Paper";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { hideRegulaminDialog } from "../../actions/toggles";
|
||||
import Regulamin from "./Regulamin";
|
||||
|
||||
export default function RegulaminDialog(props) {
|
||||
var regulaminDialog = useSelector((state) => state.data.dialogs.regulamin);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const loginStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
textAlign: "center",
|
||||
"& .MuiPaper-root": {
|
||||
backgroundColor: "#262626",
|
||||
color: "#bbbbbb",
|
||||
},
|
||||
"& .MuiFormHelperText-root": {
|
||||
color: "#606060",
|
||||
textAlign: "center",
|
||||
},
|
||||
},
|
||||
closeButton: {
|
||||
color: "#bbbbbb",
|
||||
position: "absolute",
|
||||
right: theme.spacing(1),
|
||||
top: theme.spacing(1),
|
||||
},
|
||||
paper: {
|
||||
textAlign: "left",
|
||||
padding: "18px",
|
||||
maxHeight: "50vh",
|
||||
overflow: "auto",
|
||||
},
|
||||
}));
|
||||
|
||||
const styles = loginStyles();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Dialog
|
||||
className={styles.root}
|
||||
open={regulaminDialog}
|
||||
onClose={() => dispatch(hideRegulaminDialog())}
|
||||
aria-labelledby="regulamin-title"
|
||||
>
|
||||
<DialogTitle id="regulamin-title">Regulamin</DialogTitle>
|
||||
<IconButton
|
||||
className={styles.closeButton}
|
||||
onClick={() => dispatch(hideRegulaminDialog())}
|
||||
aria-label="close"
|
||||
>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
<Divider />
|
||||
<DialogContent>
|
||||
<Paper className={styles.paper}>{<Regulamin />}</Paper>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user