mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 10:52:46 +00:00
Fully disable theme selection when in Legacy mode
Making Legacy a "theme" implies we will add more themes to Legacy, which we aren't planning to.
This commit is contained in:
@@ -98,17 +98,18 @@ const Nav = {
|
||||
);
|
||||
},
|
||||
render : function () {
|
||||
console.log(this.props.children);
|
||||
const dropdownChildren = React.Children.map(this.props.children, (child, i)=>{
|
||||
// Ignore the first child
|
||||
if(i < 1) return;
|
||||
return child;
|
||||
});
|
||||
return (
|
||||
<div className='navDropdownContainer'
|
||||
<div className={`navDropdownContainer ${this.props.className}`}
|
||||
onMouseEnter={this.props.trigger == 'hover' ? ()=>{this.handleDropdown(true);} : undefined}
|
||||
onClick= {this.props.trigger == 'click' ? ()=>{this.handleDropdown(true);} : undefined}
|
||||
onMouseLeave={()=>this.handleDropdown(false)}>
|
||||
{this.props.children[0]}
|
||||
{this.props.children[0] || this.props.children} //children is not an array when only one child
|
||||
{this.renderDropdown(dropdownChildren)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user