mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-06 08:46:39 +00:00
24 lines
672 B
TypeScript
24 lines
672 B
TypeScript
import React, { FC, useState, CSSProperties } from "react";
|
|
|
|
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 className="modal-footer">
|
|
<button
|
|
className="modal-close waves-effect waves-green btn-flat"
|
|
onClick={handleClose}
|
|
>
|
|
close
|
|
</button>
|
|
</div> */}
|
|
</div>
|
|
);
|
|
};
|