const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const NaturalCritIcon = require('naturalcrit/svg/naturalcrit.svg.jsx');
const Nav = {
base : createClass({
render : function(){
return ;
}
}),
logo : function(){
return
NaturalCrit
;
},
section : createClass({
render : function(){
return
{this.props.children}
;
}
}),
item : createClass({
getDefaultProps : function() {
return {
icon : null,
href : null,
newTab : false,
onClick : function(){},
color : null
};
},
handleClick : function(){
this.props.onClick();
},
render : function(){
const classes = cx('navItem', this.props.color, this.props.className);
let icon;
if(this.props.icon) icon = ;
const props = _.omit(this.props, ['newTab']);
if(this.props.href){
return
{this.props.children}
{icon}
;
} else {
return
{this.props.children}
{icon}
;
}
}
}),
};
module.exports = Nav;