This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/frontend/components/CenteredContent/CenteredContent.js
2017-05-11 17:23:56 -07:00

29 lines
486 B
JavaScript

// @flow
import React from 'react';
import styles from './CenteredContent.scss';
type Props = {
children?: React.Element<any>,
style?: Object,
maxWidth?: string,
};
const CenteredContent = (props: Props) => {
const style = {
maxWidth: props.maxWidth,
...props.style,
};
return (
<div className={styles.content} style={style}>
{props.children}
</div>
);
};
CenteredContent.defaultProps = {
maxWidth: '740px',
};
export default CenteredContent;