Added some markup to the Articles

This commit is contained in:
2018-11-27 12:52:46 +11:00
parent cf80504123
commit 0bf91d2bed
6 changed files with 60 additions and 15 deletions

View File

@ -23,17 +23,19 @@
import React from 'react';
import Content from './../Content';
import Styles from './ContentBox.scss';
export default (props) => {
let newProps = {...props};
let { className, box } = props;
let { className, box, content } = props;
delete newProps.box;
["box","content"].forEach(e => delete newProps[e]);
let clazz = "o-content-box";
if(box) clazz += " is-box"
if(className) clazz += ` ${className}`;
if(content) newProps.children = <Content content={content} />
return <div {...newProps} className={clazz} />;
};