grafana/public/app/core/components/Page/PluginPage.tsx
Ashley Harrison 4e492ae725
Navigation: Unify Page component (#66951)
* remove old page component

* add test to check initDashboard is only called once (prevent variables loading twice)

* add help node

* update unit tests

* remove last mentions of topnav

* fix unit tests

* remove unused props from ButtonRow interface

* remove prop from test
2023-04-24 16:41:32 +01:00

25 lines
657 B
TypeScript

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