Skip to content

Instantly share code, notes, and snippets.

@jamesslock
Created September 24, 2015 18:49
Show Gist options
  • Save jamesslock/6b6d3aa6fbd80336676a to your computer and use it in GitHub Desktop.
Save jamesslock/6b6d3aa6fbd80336676a to your computer and use it in GitHub Desktop.
PageLayout.jsx
var React = require('react'),
Footer = require('./Footer.jsx'),
Footer = require('./ScanCarousel.jsx');
var PageLayout = React.createClass({
render: function() {
if (this.props.layoutType === "withFooter") {
return (
<main className="wrapper">
<div className="wrapper__push">
{this.props.children}
</div>
<Footer />
</main>
)
}
else if (this.props.layoutType === "withScanCarousel") {
return (
<main className="wrapper">
<div className="wrapper__push">
{this.props.children}
</div>
<ScanCarousel />
</main>
)
}
else {
return (
<main>
{this.props.children}
</main>
)
}
}
});
module.exports = PageLayout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment