diff --git a/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js b/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js index 4d2a6b2a42..0a6612a173 100644 --- a/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js +++ b/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js @@ -1,6 +1,6 @@ //@flow import * as React from "react"; -import {Link, Route} from "react-router-dom"; +import { Link, Route } from "react-router-dom"; type Props = { to: string, @@ -30,18 +30,14 @@ class SubNavigation extends React.Component { } let children = null; - if(this.isActive(route)) { - children = ( - - ); + if (this.isActive(route)) { + children = ; } return (
  • - - {" "} - {label} + {label} {children}
  • @@ -53,11 +49,15 @@ class SubNavigation extends React.Component { // removes last part of url let parents = to.split("/"); - parents.splice(-1,1); + parents.splice(-1, 1); let parent = parents.join("/"); return ( - + ); } } diff --git a/scm-ui/styles/scm.scss b/scm-ui/styles/scm.scss index 3ceab48f9f..a5d2eda70e 100644 --- a/scm-ui/styles/scm.scss +++ b/scm-ui/styles/scm.scss @@ -259,21 +259,10 @@ $fa-font-path: "webfonts"; &.is-active { color: $blue; background-color: #fff; - - &:before { - position: relative; - content: " "; - background: $blue; - height: 53px; - width: 2px; - display: block; - left: -17px; - float: left; - top: -16px; - } } } - li { + + > li { ul { margin: 0; border-top: 1px solid #eee; @@ -286,6 +275,18 @@ $fa-font-path: "webfonts"; } } + > a.is-active:before { + position: relative; + content: " "; + background: $blue; + height: 53px; + width: 2px; + display: block; + left: -17px; + float: left; + top: -16px; + } + border-radius: 0; border-top: 1px solid #eee; border-left: 1px solid #eee; @@ -301,3 +302,27 @@ $fa-font-path: "webfonts"; margin-bottom: 0; } } +.sub-menu li { + line-height: 1; + + a { + padding: 0.75rem 1rem; + } + + a:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; + content: "\f105"; + padding-right: 5px; + } + + i { + display: none; + } +}