diff --git a/package.json b/package.json index 804f8756..53e04ed3 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "axios": "^0.18.0", "bootstrap": "^4.1.1", "chart.js": "^2.7.2", + "classnames": "^2.2.6", "moment": "^2.22.2", "promise": "8.0.1", "prop-types": "^15.6.2", diff --git a/src/common/MainHeader.js b/src/common/MainHeader.js index d896bd5f..54261623 100644 --- a/src/common/MainHeader.js +++ b/src/common/MainHeader.js @@ -1,4 +1,5 @@ import plusIcon from '@fortawesome/fontawesome-free-solid/faPlus'; +import arrowIcon from '@fortawesome/fontawesome-free-solid/faChevronDown'; import FontAwesomeIcon from '@fortawesome/react-fontawesome'; import React from 'react'; import { Link, withRouter } from 'react-router-dom' @@ -6,6 +7,7 @@ import { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } f import ServersDropdown from '../servers/ServersDropdown'; import './MainHeader.scss'; import shlinkLogo from './shlink-logo-white.png'; +import classnames from 'classnames'; export class MainHeader extends React.Component { state = { isOpen: false }; @@ -24,13 +26,20 @@ export class MainHeader extends React.Component { render() { const { location } = this.props; const createServerPath = '/server/create'; + const toggleClass = classnames('main-header__toggle-icon', { + 'main-header__toggle-icon--opened': this.state.isOpen, + }); return ( Shlink Shlink - + + + + +