mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
31 lines
944 B
TypeScript
31 lines
944 B
TypeScript
import React, { PureComponent } from 'react';
|
|
import appEvents from '../../app_events';
|
|
import TopSection from './TopSection';
|
|
import BottomSection from './BottomSection';
|
|
import config from 'app/core/config';
|
|
|
|
const homeUrl = config.appSubUrl || '/';
|
|
|
|
export class SideMenu extends PureComponent {
|
|
toggleSideMenuSmallBreakpoint = () => {
|
|
appEvents.emit('toggle-sidemenu-mobile');
|
|
};
|
|
|
|
render() {
|
|
return [
|
|
<a href={homeUrl} className="sidemenu__logo" key="logo">
|
|
<img src="public/img/grafana_icon.svg" alt="Grafana" />
|
|
</a>,
|
|
<div className="sidemenu__logo_small_breakpoint" onClick={this.toggleSideMenuSmallBreakpoint} key="hamburger">
|
|
<i className="fa fa-bars" />
|
|
<span className="sidemenu__close">
|
|
<i className="fa fa-times" />
|
|
Close
|
|
</span>
|
|
</div>,
|
|
<TopSection key="topsection" />,
|
|
<BottomSection key="bottomsection" />,
|
|
];
|
|
}
|
|
}
|