Added more options for split sections

This commit is contained in:
2018-06-08 12:45:19 +10:00
parent 54bb97c7d1
commit be8e66e682
2 changed files with 28 additions and 4 deletions

View File

@ -25,17 +25,28 @@ import React from 'react';
import Section from './../Section';
export default (props) => {
let clazz = "c-split-section";
let aligned = "stretched";
if(props.align) {
aligned = props.align;
}
let clazz = "c-split-section is-" + aligned;
if(props.className) clazz += " " + props.className;
return (
<Section {...props} className={clazz} />
)
};
const Split = function(props) {
let clazz = "c-split-section__split";
if(props.padded) clazz += " is-padded";
if(props.className) clazz += " "+props.className;
return (
<div className="c-split-section__split">
<div className={clazz}>
{ props.children }
</div>
);