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.
outline/frontend/components/CenteredContent/CenteredContent.js

35 lines
513 B
JavaScript

// @flow
import React from 'react';
import styled from 'styled-components';
type Props = {
children?: React.Element<any>,
style?: Object,
maxWidth?: string,
};
const Container = styled.div`
width: 100%;
margin: 40px 20px;
`;
const CenteredContent = ({
children,
maxWidth = '740px',
style,
...rest
}: Props) => {
const styles = {
maxWidth,
...style,
};
return (
<Container style={styles} {...rest}>
{children}
</Container>
);
};
export default CenteredContent;