mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 09:05:45 -06:00
* WIP: initial commit to transition to new edit mode * More old edit cleanup * Minor update * Refactoring url edit/fullscreen state to simplify logic, now seperate states * Fixed tests and part of the explore integration * Updated snapshot * Fix alert rule links * Fixed issue going back from explore * Updated snapshots * Fixes and changes * Fixed bridge srv issue * Fixed add panel issue * Removed console log * Removed render * Tests: fixes e2e smoketest * Make description optional * Fixed typings * e2e fixes * removed import * updated snapshot Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
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';
|
|
import { CoreEvents } from 'app/types';
|
|
import { Branding } from 'app/core/components/Branding/Branding';
|
|
import { Icon } from '@grafana/ui';
|
|
|
|
const homeUrl = config.appSubUrl || '/';
|
|
|
|
export class SideMenu extends PureComponent {
|
|
toggleSideMenuSmallBreakpoint = () => {
|
|
appEvents.emit(CoreEvents.toggleSidemenuMobile);
|
|
};
|
|
|
|
render() {
|
|
return [
|
|
<a href={homeUrl} className="sidemenu__logo" key="logo">
|
|
<Branding.MenuLogo />
|
|
</a>,
|
|
<div className="sidemenu__logo_small_breakpoint" onClick={this.toggleSideMenuSmallBreakpoint} key="hamburger">
|
|
<Icon name="bars" size="xl" />
|
|
<span className="sidemenu__close">
|
|
<Icon name="times" />
|
|
Close
|
|
</span>
|
|
</div>,
|
|
<TopSection key="topsection" />,
|
|
<BottomSection key="bottomsection" />,
|
|
];
|
|
}
|
|
}
|