Skip to content

Instantly share code, notes, and snippets.

@cimfalab
Created July 19, 2017 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cimfalab/3e72e2339f23fca628949d19be4bda88 to your computer and use it in GitHub Desktop.
Save cimfalab/3e72e2339f23fca628949d19be4bda88 to your computer and use it in GitHub Desktop.
components/home.js
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