2018-02-26 00:11:31 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
2018-05-18 23:29:14 +01:00
|
|
|
import Paper from '@material-ui/core/Paper';
|
|
|
|
import { withStyles } from '@material-ui/core/styles';
|
|
|
|
import Typography from '@material-ui/core/Typography';
|
2018-02-26 00:11:31 +00:00
|
|
|
|
|
|
|
const styles = theme => ({
|
|
|
|
content: {
|
2019-06-02 19:01:06 +01:00
|
|
|
padding: theme.spacing(2),
|
|
|
|
margin: theme.spacing(2),
|
2018-02-26 00:11:31 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
function SectionContent(props) {
|
|
|
|
const { children, classes, title } = props;
|
|
|
|
return (
|
|
|
|
<Paper className={classes.content}>
|
2019-05-24 12:19:27 +01:00
|
|
|
<Typography variant="h6">
|
2018-02-26 00:11:31 +00:00
|
|
|
{title}
|
|
|
|
</Typography>
|
|
|
|
{children}
|
|
|
|
</Paper>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
SectionContent.propTypes = {
|
|
|
|
classes: PropTypes.object.isRequired,
|
|
|
|
children: PropTypes.oneOfType([
|
|
|
|
PropTypes.arrayOf(PropTypes.node),
|
|
|
|
PropTypes.node
|
|
|
|
]).isRequired,
|
|
|
|
title: PropTypes.string.isRequired
|
|
|
|
};
|
|
|
|
|
|
|
|
export default withStyles(styles)(SectionContent);
|