CollectionNew scene

This commit is contained in:
Tom Moor
2017-07-09 10:27:29 -07:00
parent 98da54d82a
commit f456dc6b6a
12 changed files with 164 additions and 72 deletions

View File

@ -0,0 +1,36 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import ReactModal from 'react-modal';
class Modal extends Component {
render() {
const {
children,
title = 'Untitled Modal',
onRequestClose,
...rest
} = this.props;
return (
<ReactModal
contentLabel={title}
onRequestClose={onRequestClose}
{...rest}
>
<Header>
<button onClick={onRequestClose}>Close</button>
{title}
</Header>
{children}
</ReactModal>
);
}
}
const Header = styled.div`
text-align: center;
font-weight: semibold;
`;
export default Modal;