0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 10:22:38 +00:00

Add color mixins, help dropdown, and remove unused nav items

This commit is contained in:
Charlie Humphreys
2022-01-26 08:40:33 -06:00
parent 603cf2c0ab
commit 38c0527d35
12 changed files with 102 additions and 77 deletions

View File

@@ -0,0 +1,49 @@
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const Nav = require('naturalcrit/nav/nav.jsx');
const Help = createClass({
getInitialState : function() {
return {
showDropdown : false
};
},
handleDropdown : function(show){
this.setState({
showDropdown : show
});
},
renderDropdown : function(){
return !this.state.showDropdown ? null : <div className='dropdown'>
<a href={`https://www.reddit.com/r/homebrewery/submit?selftext=true&title=${encodeURIComponent('[Issue] Describe Your Issue Here')}`}
className='item red'
target='_blank'
rel='noopener noreferrer'>
<span className='title'>report issue <i className='fas fa-fw fa-bug'/></span>
</a>
<a href='/migrate'
className='item blue'
target='_blank'
rel='noopener noreferrer'>
<span className='title'>migrate <i className='fas fa-fw fa-route'/></span>
</a>
</div>;
},
render : function(){
return <Nav.item icon='fas fa-life-ring' color='grey' className='recent'
onMouseEnter={()=>this.handleDropdown(true)}
onMouseLeave={()=>this.handleDropdown(false)}>
Need Help?
{this.renderDropdown()}
</Nav.item>;
}
});
module.exports = Help;