From f84dc9f8b8b4eaa7621f9ee4fc83ef38a85c431b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 17 Aug 2021 11:30:29 +0200 Subject: feat(ui): Add context selectors This change adds context selectors for the OpenDC frontend where the user can select different projects, portfolios or topologies from the context selection bar. --- opendc-web/opendc-web-ui/src/components/AppPage.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/components/AppPage.js') diff --git a/opendc-web/opendc-web-ui/src/components/AppPage.js b/opendc-web/opendc-web-ui/src/components/AppPage.js index 2e0ea4cc..25afaf9a 100644 --- a/opendc-web/opendc-web-ui/src/components/AppPage.js +++ b/opendc-web/opendc-web-ui/src/components/AppPage.js @@ -23,11 +23,15 @@ import PropTypes from 'prop-types' import { AppHeader } from './AppHeader' import React from 'react' -import { Page } from '@patternfly/react-core' +import { Page, PageGroup, PageBreadcrumb } from '@patternfly/react-core' -export function AppPage({ children, breadcrumb, tertiaryNav }) { +export function AppPage({ children, breadcrumb, contextSelectors }) { return ( - }> + }> + + {contextSelectors} + {breadcrumb && {breadcrumb}} + {children} ) @@ -35,6 +39,6 @@ export function AppPage({ children, breadcrumb, tertiaryNav }) { AppPage.propTypes = { breadcrumb: PropTypes.node, - tertiaryNav: PropTypes.node, + contextSelectors: PropTypes.node, children: PropTypes.node, } -- cgit v1.2.3