-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core) add a help menu with links to docs and community (#4903)
- Loading branch information
Scott Bloch-Wehba-Seaward
committed
Feb 23, 2018
1 parent
e8d3973
commit 4849bdf
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.help-menu { | ||
border: 0; | ||
|
||
.dropdown-toggle, | ||
.dropdown-toggle:active { | ||
border: 0; | ||
font-size: 14px; | ||
font-weight: 200; | ||
margin: 0; | ||
border: 0; | ||
background: transparent; | ||
border-radius: 0; | ||
color: var(--color-white); | ||
|
||
.caret { | ||
margin-left: 3px; | ||
} | ||
} | ||
|
||
.dropdown.open { | ||
.dropdown-toggle { | ||
background-color: transparent; | ||
text-decoration: none; | ||
color: var(--color-white); | ||
box-shadow: none; | ||
} | ||
} | ||
|
||
.dropdown-menu { | ||
border: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as React from 'react'; | ||
import { Dropdown, MenuItem, Glyphicon } from 'react-bootstrap'; | ||
|
||
import './HelpMenu.less'; | ||
|
||
const DOCS_URL = 'https://spinnaker.io/docs'; | ||
const COMMUNITY_URL = 'https://spinnaker.io/community'; | ||
|
||
export const HelpMenu = () => { | ||
return ( | ||
<li className="help-menu"> | ||
<Dropdown id="help-menu-dropdown" pullRight={true}> | ||
<Dropdown.Toggle className="hidden-lg" noCaret={true}> | ||
<Glyphicon glyph="question-sign" /> | ||
</Dropdown.Toggle> | ||
<Dropdown.Menu> | ||
<MenuItem href={DOCS_URL} target="_blank"> | ||
Docs | ||
</MenuItem> | ||
<MenuItem divider={true} /> | ||
<MenuItem href={COMMUNITY_URL} target="_blank"> | ||
Community Resources | ||
</MenuItem> | ||
</Dropdown.Menu> | ||
</Dropdown> | ||
|
||
<Dropdown id="help-menu-dropdown-large" pullRight={true}> | ||
<Dropdown.Toggle className="hidden-xs hidden-sm hidden-md"> | ||
Help | ||
</Dropdown.Toggle> | ||
<Dropdown.Menu> | ||
<MenuItem href={DOCS_URL} target="_blank"> | ||
Docs | ||
</MenuItem> | ||
<MenuItem href={COMMUNITY_URL} target="_blank"> | ||
Community Resources | ||
</MenuItem> | ||
</Dropdown.Menu> | ||
</Dropdown> | ||
</li> | ||
); | ||
}; |