fleet/frontend/components/Modal/Modal.jsx
Mike Arpaia c07702330d Cleaning JavaScript imports and if statements (#327)
* Moving entityGetter to utility folder

* Import whitespace and if statement braces

* newlines between multi-line if's
2016-10-19 16:22:18 -04:00

40 lines
896 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { Component, PropTypes } from 'react';
import radium from 'radium';
import componentStyles from './styles';
class Modal extends Component {
static propTypes = {
children: PropTypes.node,
onExit: PropTypes.func,
overrideStyles: PropTypes.object,
title: PropTypes.string,
};
render () {
const { children, onExit, title } = this.props;
const {
containerStyles,
contentStyles,
exStyles,
headerStyles,
modalStyles,
} = componentStyles;
return (
<div style={containerStyles}>
<div style={modalStyles}>
<div style={headerStyles}>
<span>{title}</span>
<span style={exStyles} onClick={onExit}></span>
</div>
<div style={contentStyles}>
{children}
</div>
</div>
</div>
);
}
}
export default radium(Modal);