mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-06 08:46:39 +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 {
|
||||
handleClose: () => void;
|
||||
show: boolean;
|
||||
}
|
||||
|
||||
export const Modal: FC<IProps> = ({ handleClose, show, children }) => {
|
||||
const showHideStyle: CSSProperties = show
|
||||
? { display: "block", zIndex: 10 }
|
||||
: { display: "none", zIndex: 10 };
|
||||
return (
|
||||
<div className="modal" style={showHideStyle}>
|
||||
<div className="modal-content">{children}</div>
|
||||
</div>
|
||||
<Dialog open={show} onClose={handleClose}>
|
||||
{children}
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue