mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
fix vertical alignment of icons in navigation
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
import classNames from "classnames";
|
||||||
import {Link, Route} from "react-router-dom";
|
import {Link, Route} from "react-router-dom";
|
||||||
|
|
||||||
// TODO mostly copy of PrimaryNavigationLink
|
// TODO mostly copy of PrimaryNavigationLink
|
||||||
@@ -28,7 +29,7 @@ class NavLink extends React.Component<Props> {
|
|||||||
|
|
||||||
let showIcon = null;
|
let showIcon = null;
|
||||||
if (icon) {
|
if (icon) {
|
||||||
showIcon = (<><i className={icon} />{" "}</>);
|
showIcon = (<><i className={classNames(icon, "fa-fw")} />{" "}</>);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { Link, Route } from "react-router-dom";
|
import { Link, Route } from "react-router-dom";
|
||||||
|
import classNames from "classnames";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
to: string,
|
to: string,
|
||||||
@@ -37,7 +38,7 @@ class SubNavigation extends React.Component<Props> {
|
|||||||
return (
|
return (
|
||||||
<li>
|
<li>
|
||||||
<Link className={this.isActive(route) ? "is-active" : ""} to={to}>
|
<Link className={this.isActive(route) ? "is-active" : ""} to={to}>
|
||||||
<i className={defaultIcon} /> {label}
|
<i className={classNames(defaultIcon, "fa-fw")} /> {label}
|
||||||
</Link>
|
</Link>
|
||||||
{children}
|
{children}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user