Added more options for split sections
This commit is contained in:
@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user