Created
July 7, 2015 02:37
-
-
Save AprilArcus/eddf922770d6c812943d to your computer and use it in GitHub Desktop.
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
export default React.createClass({ | |
displayName: 'Oceans Navigation Category', | |
propTypes: { | |
list: React.PropTypes.arrayOf( | |
React.PropTypes.shape({ | |
humanReadableName: React.PropTypes.string, | |
url: React.PropTypes.string | |
}) | |
), | |
name: React.PropTypes.string | |
}, | |
mixins: [pureRenderMixin], | |
render() { | |
return ( | |
<li className={'oceans-category'} | |
style={styles.item}> | |
{stylesheet} | |
<span style={styles.category}> | |
{this.props.name} | |
</span> | |
{this.props.list.map( (route, index) => | |
<Link className={'name'} | |
key={index} | |
style={styles.name} | |
to={route.baseName} > | |
{route.humanReadableName} | |
</Link> | |
)} | |
</li> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment