From f51322a556d67dd6ae837da4d977219ddbaba5f8 Mon Sep 17 00:00:00 2001 From: cha0s Date: Thu, 2 Jul 2020 02:58:39 -0500 Subject: [PATCH] feat: basic menu --- src/client/app.jsx | 81 ++++++++++++++++++++++++------------- src/client/menubar.raw.scss | 1 + 2 files changed, 53 insertions(+), 29 deletions(-) diff --git a/src/client/app.jsx b/src/client/app.jsx index ac60aa3..78e1c43 100644 --- a/src/client/app.jsx +++ b/src/client/app.jsx @@ -7,6 +7,7 @@ import React from 'react'; import {useSelector} from 'react-redux'; import TypeRenderersContext from './context/typeRenderers'; +import Menubar from './menubar'; import Resources from './resources'; import Sidebar from './sidebar'; import SidebarIcons from './sidebar-icons'; @@ -28,38 +29,60 @@ const App = () => { const activeSidebarIndex = useSelector(activeSidebarIndexSelector); const isSidebarExpanded = useSelector(isSidebarExpandedSelector); const resourceUris = useSelector(resourceUrisSelector); + const menuTree = [ + { + label: 'File', + children: [ + { + label: 'Create a new...', + children: [ + { + label: 'Entity', + onClick: () => {}, + }, + ], + }, + ], + }, + ]; return (
-
-
- -
-
- -
-
- +
+ } + tree={menuTree} + /> +
+
+ +
+
+ +
+
+ +
diff --git a/src/client/menubar.raw.scss b/src/client/menubar.raw.scss index b03a38e..c28295f 100644 --- a/src/client/menubar.raw.scss +++ b/src/client/menubar.raw.scss @@ -2,6 +2,7 @@ background-color: #444444; display: flex; font-family: var(--title-font-family); + font-size: 0.9em; position: relative; z-index: 1000; }