Fix a bunch of layout issues
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user