Fix a bunch of layout issues
This commit is contained in:
@@ -6,7 +6,8 @@ import { reactAutoBind } from 'auto-bind2'
|
||||
|
||||
export class Dimmer extends Component {
|
||||
static propTypes = {
|
||||
children: PropTypes.node
|
||||
children: PropTypes.node,
|
||||
active: PropTypes.bool
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
@@ -19,11 +20,11 @@ export class Dimmer extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
return this.props.active ? (
|
||||
<div style={style.dimmer} onClick={this.preventPropagation}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
)
|
||||
) : null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user