Me learning react like an absolute chungus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
400B

  1. import "./modal.css";
  2. type ModalProps = {
  3. handleClose: () => void;
  4. show: boolean;
  5. children: any;
  6. };
  7. const Modal = (props: ModalProps) => {
  8. const showHideClassName = props.show
  9. ? "modal display-block"
  10. : "modal display-none";
  11. return (
  12. <div className={showHideClassName}>
  13. <section className="modal-main">{props.children}</section>
  14. </div>
  15. );
  16. };
  17. export default Modal;