From 6bf4fc6cf87a950302cda5c810fd6e491884da64 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 1 Feb 2022 00:02:46 -0500 Subject: [PATCH] Help dropdown uses existing dropdown class. Small tweaks. --- client/homebrew/navbar/help.navitem.jsx | 62 ++++++++----------------- client/homebrew/navbar/navbar.less | 10 ++-- shared/naturalcrit/nav/nav.less | 2 + 3 files changed, 24 insertions(+), 50 deletions(-) diff --git a/client/homebrew/navbar/help.navitem.jsx b/client/homebrew/navbar/help.navitem.jsx index 7252d03c7..b4be18319 100644 --- a/client/homebrew/navbar/help.navitem.jsx +++ b/client/homebrew/navbar/help.navitem.jsx @@ -4,46 +4,22 @@ 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 :
- - report issue - - - migrate - -
; - }, - - render : function(){ - return this.handleDropdown(true)} - onMouseLeave={()=>this.handleDropdown(false)}> - Need Help? - {this.renderDropdown()} - ; - } - -}); - -module.exports = Help; +module.exports = function(props){ + return + + need help? + + + report issue + + + migrate + + ; +}; diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index b8a032914..a149307e8 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -68,8 +68,7 @@ color: pink; } } - .recent.navItem, - .help.navItem{ + .recent.navItem { position : relative; .dropdown{ position : absolute; @@ -97,7 +96,7 @@ position : relative; display : block; box-sizing : border-box; - padding : 13px 5px; + padding : 8px 5px 13px; background-color : #333; color : white; text-decoration : none; @@ -106,14 +105,11 @@ background-color : @blue; } .title{ + display : inline-block; overflow : hidden; width : 100%; text-overflow : ellipsis; white-space : nowrap; - - i{ - float: right; - } } .time{ position : absolute; diff --git a/shared/naturalcrit/nav/nav.less b/shared/naturalcrit/nav/nav.less index 02e890dea..f84d11733 100644 --- a/shared/naturalcrit/nav/nav.less +++ b/shared/naturalcrit/nav/nav.less @@ -60,9 +60,11 @@ nav{ color : white; text-decoration : none; text-transform : uppercase; + line-height : 13px; i{ margin-left : 5px; font-size : 13px; + float : right; } } .navSection:last-child .navItem{