Created
October 16, 2017 03:51
-
-
Save burgwyn/0f7776d41dc8696ac7cdf8645b558147 to your computer and use it in GitHub Desktop.
Good styling
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
# 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