Created
December 29, 2020 04:02
-
-
Save Yudhajitadhikary/2255fdb101a96e9fb13c2b449391af73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './Modal.css'; | |
import Button from '../Button/Button'; | |
const modal = props => ( | |
<div className={`modal ${props.open ? 'open' : ''}`}> | |
<header className="modal__header"> | |
<h1>{props.title}</h1> | |
</header> | |
<section className="modal__content"> | |
{props.children} | |
</section> | |
<section className="modal__actions"> | |
<Button type="button" onClick={props.onClose}>Okay</Button> | |
</section> | |
</div> | |
); | |
export default modal; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment