Skip to content

Instantly share code, notes, and snippets.

@AprilArcus
Created July 7, 2015 02:37
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 AprilArcus/eddf922770d6c812943d to your computer and use it in GitHub Desktop.
Save AprilArcus/eddf922770d6c812943d to your computer and use it in GitHub Desktop.
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