Allowed sections to have custom classes
This commit is contained in:
@ -17,12 +17,14 @@ class Section extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let style = (this.props.section ? "c-section--style-"+this.props.section : "");
|
let clazz = "c-section";
|
||||||
let fullWidth = this.props.full ? "c-section--full-width" : "";
|
|
||||||
console.log(this.props);
|
if(this.props.section) clazz += " c-section--style-"+this.props.section;
|
||||||
|
if(this.props.full) clazz += " c-section--full-width";
|
||||||
|
if(this.props.className) clazz += " " + this.props.className;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={"c-section " + style + " " + fullWidth }>
|
<section className={ clazz }>
|
||||||
{ this.props.children }
|
{ this.props.children }
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user