This commit is contained in:
Ahmed Bouhuolia
2020-02-18 23:09:15 +02:00
parent a37341ff00
commit 56701951b7
11 changed files with 142 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
import React from 'react';
import {connect} from 'react-redux';
import {
Navbar,
NavbarGroup,
@@ -10,7 +11,7 @@ import {
Popover,
} from '@blueprintjs/core';
export default function DashboardTopbar({ pageTitle }) {
function DashboardTopbar({ pageTitle }) {
const userAvatarDropMenu = (
<Menu>
<MenuItem icon="graph" text="Graph" />
@@ -23,8 +24,16 @@ export default function DashboardTopbar({ pageTitle }) {
);
return (
<div class="dashboard__topbar">
<h1 class="dashboard__title">{ pageTitle }</h1>
<div>
<Button>
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false">
<title>Menu</title>
<path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path>
</svg>
</Button>
<h1 class="dashboard__title">{ pageTitle }</h1>
</div>
<div class="dashboard__topbar-actions">
<Navbar class="dashboard__topbar-navbar">
<NavbarGroup>
@@ -43,4 +52,9 @@ export default function DashboardTopbar({ pageTitle }) {
</div>
</div>
);
}
}
const mapStateToProps = (state) => ({
pageTitle: state.dashboard.pageTitle,
});
export default connect(mapStateToProps)(DashboardTopbar);

View File