Skip to content

Instantly share code, notes, and snippets.

@Yudhajitadhikary
Created December 29, 2020 04:02
Show Gist options
  • Save Yudhajitadhikary/2255fdb101a96e9fb13c2b449391af73 to your computer and use it in GitHub Desktop.
Save Yudhajitadhikary/2255fdb101a96e9fb13c2b449391af73 to your computer and use it in GitHub Desktop.
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