Fix a bunch of layout issues

This commit is contained in:
John Lyon-Smith
2018-02-26 12:05:23 -08:00
parent ab243dc6db
commit f8e930d59e
29 changed files with 279 additions and 301 deletions

View File

@@ -1,30 +1,22 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import style from './Modal.style'
import { reactAutoBind } from 'auto-bind2'
import Radium from 'radium'
import { Dimmer } from '../ui'
class Modal extends Component {
static propTypes = {
children: PropTypes.node
}
constructor(props) {
super(props)
reactAutoBind(this)
}
preventPropagation(e) {
e.stopPropagation()
children: PropTypes.node,
open: PropTypes.bool
}
render() {
return (
<div style={style.dimmer} onClick={this.preventPropagation}>
<Dimmer active={this.props.open}>
<div style={style.modal}>
{this.props.children}
</div>
</div>
</Dimmer>
)
}
}