Skip to content

Instantly share code, notes, and snippets.

@burgwyn
Created October 16, 2017 03:51
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 burgwyn/0f7776d41dc8696ac7cdf8645b558147 to your computer and use it in GitHub Desktop.
Save burgwyn/0f7776d41dc8696ac7cdf8645b558147 to your computer and use it in GitHub Desktop.
Good styling
# JSX
render() {
let hiddenClass = '';
if (this.props.hideArrow) {
hiddenClass = 'hide';
}
return (
<button className={`filter-toggle ${hiddenClass}`}
...
</button>
);
}
# CSS
.hide {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment