Created
June 29, 2016 17:44
-
-
Save JoeTheDave/5d78f9aae295b2f19c8c3f96c0d0ec75 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import React from 'react'; | |
const ExampleComponent = ({show}) => { | |
const componentClasses = ['example-component']; | |
if (show) { componentClasses.push('show'); } | |
return ( | |
<div className={componentClasses.join(' ')}></div> | |
); | |
}; | |
ExampleComponent.propTypes = { | |
show: React.PropTypes.bool.isRequired | |
}; | |
export default ExampleComponent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment