Added more views and atlas APIs
This commit is contained in:
27
src/components/CenteredContent/CenteredContent.js
Normal file
27
src/components/CenteredContent/CenteredContent.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
|
||||
import styles from './CenteredContent.scss';
|
||||
|
||||
const CenteredContent = (props) => {
|
||||
const style = {
|
||||
maxWidth: props.maxWidth,
|
||||
...props.style,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={ styles.content } style={ style }>
|
||||
{ props.children }
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
CenteredContent.defaultProps = {
|
||||
maxWidth: '600px',
|
||||
};
|
||||
|
||||
CenteredContent.propTypes = {
|
||||
children: React.PropTypes.node.isRequired,
|
||||
style: React.PropTypes.object,
|
||||
};
|
||||
|
||||
export default CenteredContent;
|
||||
5
src/components/CenteredContent/CenteredContent.scss
Normal file
5
src/components/CenteredContent/CenteredContent.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
.content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
margin: 40px 20px;
|
||||
}
|
||||
2
src/components/CenteredContent/index.js
Normal file
2
src/components/CenteredContent/index.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import CenteredContent from './CenteredContent';
|
||||
export default CenteredContent;
|
||||
Reference in New Issue
Block a user