grafana/public/app/core/components/PageNew/PluginPage.tsx
Torkel Ödegaard 11de1dfe40
TopNav: Plugin page layouts / information architecture (#53174)
* Change nav structure when topnav is enable to do initial tests with new information architecture

* Support for nested sections

* Updated

* sentance case

* Progress on plugin challange

* Rewrite to functional component

* Progress

* Updates

* Progress

* Progress on things

* missing file

* Fixing issue with runtime, need to use setter way to set component exposed via runtime

* Move PageLayoutType to grafana/data

* Fixing breadcrumb issue, adding more tests

* reverted backend change

* fix recursive issue with cleanup
2022-09-05 14:56:08 +02:00

17 lines
502 B
TypeScript

import React, { useContext } from 'react';
import { PluginPageProps } from '@grafana/runtime';
import { PluginPageContext } from 'app/features/plugins/components/PluginPageContext';
import { Page } from '../Page/Page';
export function PluginPage({ children, pageNav, layout }: PluginPageProps) {
const context = useContext(PluginPageContext);
return (
<Page navModel={context.sectionNav} pageNav={pageNav} layout={layout}>
<Page.Contents>{children}</Page.Contents>
</Page>
);
}