aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/ContentSection/ContentSection.js
blob: 5108ce0a82be90966dad919a23e9d748c3b9950e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from 'react';

import {
  Typography,
  Divider,
  makeStyles
} from '@material-ui/core';


const useStyles = makeStyles(theme => ({
  content: {
    padding: theme.spacing(0, 2, 1, 2),
    marginBottom: theme.spacing(1),

    '& a': {
      color: theme.palette.secondary.light,
    },
    '& .MuiButton-root': {
      color: theme.palette.background.paper,
      margin: theme.spacing(1, 2, 2, 0),
      fontWeight: 'bold',
    },
  },
}));

const ContentSection = ({ sectionName, children }) => {
  const classes = useStyles();

  return (
    <>
      <Typography variant="h4">{sectionName}</Typography>
      <Divider variant="middle"/>
      <Typography component="div" className={classes.content}>
        {children}
      </Typography>
    </>
  );

};


export default ContentSection;