ArticleSection.tsx 1.25 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
import * as React from 'react';
import withStyles from '@material-ui/core/styles/withStyles';

import Article from 'model/cms/Article';

import Grid from '@material-ui/core/Grid';

const styles = () => ({
  /*tslint:disable*/
  root: {
    minHeight: 'calc(100vh - 365px)',
    backgroundColor: 'white',
    padding: '33px 40px 49px 40px',
    '& > p': {
      fontFamily: 'Roboto-Light',
      fontSize: '24px',
      color: '#4d4c46',
      lineHeight: '36px',
      margin: 0,
    },
    '& > h3': {
      fontSize: '24px',
      marginTop: '28px',
      paddingBottom: '6px',
    },
    '& > ul': {
      marginTop: '30px',
      padding: 0,
      paddingLeft: '11px',
    },
    '& > ul > li': {
      fontFamily: 'Roboto-Regular',
      fontSize: '18px',
      lineHeight: '30px',
    },
  },
  /*tslint:enable*/
});

interface IArticleSectionProps extends React.ClassAttributes<any> {
  article: Article;
  classes: any;
}

class ArticleSection extends React.Component<IArticleSectionProps> {

  public render() {
    const {article, classes} = this.props;
    return(
      <Grid item xs={ 9 }>
        <div className={ classes.root } dangerouslySetInnerHTML={ {__html: article.body} }/>
      </Grid>
    );
  }

}

export default withStyles(styles)(ArticleSection);