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.
|
- import "./modal.css";
-
- type ModalProps = {
- handleClose: () => void;
- show: boolean;
- children: any;
- };
- const Modal = (props: ModalProps) => {
- const showHideClassName = props.show
- ? "modal display-block"
- : "modal display-none";
-
- return (
- <div className={showHideClassName}>
- <section className="modal-main">{props.children}</section>
- </div>
- );
- };
-
- export default Modal;
|