frontend > app
This commit is contained in:
29
app/components/CenteredContent/CenteredContent.js
Normal file
29
app/components/CenteredContent/CenteredContent.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
type Props = {
|
||||
children?: React.Element<any>,
|
||||
};
|
||||
|
||||
const Container = styled.div`
|
||||
width: 100%;
|
||||
margin: 60px 20px;
|
||||
`;
|
||||
|
||||
const Content = styled.div`
|
||||
max-width: 50em;
|
||||
margin: 0 auto;
|
||||
`;
|
||||
|
||||
const CenteredContent = ({ children, ...rest }: Props) => {
|
||||
return (
|
||||
<Container {...rest}>
|
||||
<Content>
|
||||
{children}
|
||||
</Content>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
export default CenteredContent;
|
||||
3
app/components/CenteredContent/index.js
Normal file
3
app/components/CenteredContent/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
import CenteredContent from './CenteredContent';
|
||||
export default CenteredContent;
|
||||
Reference in New Issue
Block a user