Converted a couple of components to flow-types

This commit is contained in:
Tom Moor
2017-04-27 22:18:46 -07:00
parent 4e5c3944d8
commit da8cf6f600
4 changed files with 25 additions and 27 deletions

View File

@ -1,8 +1,13 @@
// @flow
import React from 'react';
import styles from './CenteredContent.scss';
const CenteredContent = props => {
type Props = {
children: any,
style: Object,
};
const CenteredContent = (props: Props) => {
const style = {
maxWidth: props.maxWidth,
...props.style,
@ -19,9 +24,4 @@ CenteredContent.defaultProps = {
maxWidth: '740px',
};
CenteredContent.propTypes = {
children: React.PropTypes.node.isRequired,
style: React.PropTypes.object,
};
export default CenteredContent;