Created
July 19, 2017 09:10
-
-
Save cimfalab/3e72e2339f23fca628949d19be4bda88 to your computer and use it in GitHub Desktop.
components/home.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function renderSection(section, index) { | |
const content = [( | |
<div className={`fcol fg bullet-info ${(index % 2) ? '' : 'bullet-info-reversed'}`}> | |
<div className="bullet-point-title"> | |
{section.title} | |
</div> | |
<div className="bullet-point-text"> | |
{section.text} | |
</div> | |
</div> | |
), ( | |
<div className="bullet-example"> | |
{section.component} | |
</div> | |
)]; | |
return ( | |
<div className="bullet-point f"> | |
{!(index % 2) ? content.reverse() : content} | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment