diff --git a/client/homebrew/navbar/nav.jsx b/client/homebrew/navbar/nav.jsx
index 7af6bcb79..cf1ddb366 100644
--- a/client/homebrew/navbar/nav.jsx
+++ b/client/homebrew/navbar/nav.jsx
@@ -1,21 +1,16 @@
import './navbar.less';
import React, { useState, useRef, useEffect } from 'react';
-import createReactClass from 'create-react-class';
-import _ from 'lodash';
import cx from 'classnames';
import NaturalCritIcon from '@components/svg/naturalcrit-d20.svg.jsx';
const Nav = {
- base : createReactClass({
- displayName : 'Nav.base',
- render : function(){
- return ;
- }
- }),
- logo : function(){
+ base : ({ children, className, ...props })=>{
+ return ;
+ },
+ logo : ()=>{
return
@@ -24,50 +19,26 @@ const Nav = {
;
},
- section : createReactClass({
- displayName : 'Nav.section',
- render : function(){
- return
- {this.props.children}
+ section : ({ children, className, ...props })=>{
+ return
+ {children}
+
;
+ },
+
+ item : ({ icon, href, newTab, onClick, color, children, className, ...props })=>{
+ const classes = cx('navItem', color, className);
+ if(href){
+ return
+ {children}
+ {icon && }
+ ;
+ } else {
+ return
+ {children}
+ {icon && }
;
}
- }),
-
- item : createReactClass({
- displayName : 'Nav.item',
- getDefaultProps : function() {
- return {
- icon : null,
- href : null,
- newTab : false,
- onClick : function(){},
- color : null
- };
- },
- handleClick : function(e){
- this.props.onClick(e);
- },
- 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}
-
;
- }
- }
- }),
+ },
dropdown : function dropdown(props) {
props = Object.assign({}, props, {