Skip to content

Instantly share code, notes, and snippets.

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 NickToye/2b9cb4235c3f9c9892d17f9c32398249 to your computer and use it in GitHub Desktop.
Save NickToye/2b9cb4235c3f9c9892d17f9c32398249 to your computer and use it in GitHub Desktop.
render() {
const details = this.props.details;
const paletteType = this.props.details.section;
return (
<div key={details.key}>
<h2>This is {paletteType} palette</h2>
<div className="o-grid o-grid--centre o-grid--start o-grid--auto">
{Object.keys(this.state.colours)
.filter(function(filteredSwatches) {
return colours[filteredSwatches].colourType === paletteType;
})
.map(key => <SwatchCard key={key} details={this.state.colours[key]} />)}
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment