mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-09 02:06:39 +00:00
16 lines
444 B
TypeScript
16 lines
444 B
TypeScript
import React, { FC, 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>
|
|
);
|
|
};
|