mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 11:46:40 +00:00
Updated Modal to Material UI
This commit is contained in:
parent
d5ff0b4c44
commit
7da47f6eb9
1 changed files with 6 additions and 7 deletions
|
|
@ -1,16 +1,15 @@
|
||||||
import React, { FC, CSSProperties } from "react";
|
import React, { FC } from "react";
|
||||||
|
import Dialog from "@material-ui/core/Dialog";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
handleClose: () => void;
|
handleClose: () => void;
|
||||||
show: boolean;
|
show: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Modal: FC<IProps> = ({ handleClose, show, children }) => {
|
export const Modal: FC<IProps> = ({ handleClose, show, children }) => {
|
||||||
const showHideStyle: CSSProperties = show
|
|
||||||
? { display: "block", zIndex: 10 }
|
|
||||||
: { display: "none", zIndex: 10 };
|
|
||||||
return (
|
return (
|
||||||
<div className="modal" style={showHideStyle}>
|
<Dialog open={show} onClose={handleClose}>
|
||||||
<div className="modal-content">{children}</div>
|
{children}
|
||||||
</div>
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue