Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
feat(menu): styling for vertical menu (#152)
Browse files Browse the repository at this point in the history
* feat(menu): styles for vertical nav menu
  • Loading branch information
andrewleyva authored Jan 25, 2018
1 parent f366117 commit 5ae64ef
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
Binary file added snaps/ref/Menu-vertical-nav-menu-chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added snaps/ref/Menu-vertical-nav-menu-ou-chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions src/components/suir/menu/Menu.examples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#### Menu
```js
const Menu = require('semantic-ui-react').Menu;
const Segment = require('semantic-ui-react').Segment;
<div>
Expand All @@ -11,3 +12,30 @@
<img src='http://semantic-ui.com/images/wireframe/paragraph.png' />
</Segment>
</div>
```

#### Vertical Nav Menu
```js
const Menu = require('semantic-ui-react').Menu;
const Segment = require('semantic-ui-react').Segment;
<div style={{width: '180px'}}>
<Menu vertical className='nav'>
<Menu.Item name='About' active />
<Menu.Item name='Change Password' />
<Menu.Item name='Updates' />
</Menu>
</div>
```

#### Vertical Nav Menu (outlier text)
```js
const Menu = require('semantic-ui-react').Menu;
const Segment = require('semantic-ui-react').Segment;
<div style={{width: '180px'}}>
<Menu vertical className='nav'>
<Menu.Item name='Change System Password' active />
<Menu.Item name='Alongwordisbrokentofitproperly' />
<Menu.Item name='camelCaseIsProperlyHandled' />
</Menu>
</div>
```
57 changes: 57 additions & 0 deletions src/semantic-ui-theme/themes/tripwire/collections/menu.overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
/*******************************
Theme Overrides
*******************************/

@menuBorderColor: #d8d8d8;
@menuTextColor: #454545;
@menuItemBackgroundColor: #f5f5f5;
@ElegantIconArrowCarrotRight: '5';

.ui.vertical.nav.menu {
border: 0;
padding: 0;
width: 100%;
list-style: none;
box-shadow: none;
font-size: 16px;
.item {
position: relative;
display: block;
border: 1px solid @menuBorderColor;
box-shadow: none;
padding: 1em;
color: @menuTextColor;
word-wrap: break-word;
cursor: pointer;
&.active {
background-color: @menuItemBackgroundColor;
font-weight: bold;
padding-right: 2em;
&:after {
content: @ElegantIconArrowCarrotRight;
color: @primaryColor;
font-family: 'ElegantIcons';
font-size: 24px;
font-weight: bolder;
position: absolute;
right: .25em;
top: 50%;
transform: translateY(-50%);
}
}
&:before {
height: 0px;
}
&:hover {
background-color: @menuItemBackgroundColor;
color: @menuTextColor;
}

}
.item:first-child {
border-bottom: 0;
border-radius: 0 !important;
}

.item:last-child {
border-top: 0;
border-radius: 0 !important;
}
}

0 comments on commit 5ae64ef

Please sign in to comment.