2022-09-05 07:56:08 -05:00
|
|
|
import React, { useContext } from 'react';
|
|
|
|
|
|
|
|
import { PluginPageProps } from '@grafana/runtime';
|
|
|
|
import { PluginPageContext } from 'app/features/plugins/components/PluginPageContext';
|
|
|
|
|
|
|
|
import { Page } from '../Page/Page';
|
|
|
|
|
2022-10-05 04:46:27 -05:00
|
|
|
export function PluginPage({ children, pageNav, layout, subTitle }: PluginPageProps) {
|
2022-09-05 07:56:08 -05:00
|
|
|
const context = useContext(PluginPageContext);
|
|
|
|
|
|
|
|
return (
|
2022-10-05 04:46:27 -05:00
|
|
|
<Page navModel={context.sectionNav} pageNav={pageNav} layout={layout} subTitle={subTitle}>
|
2022-09-05 07:56:08 -05:00
|
|
|
<Page.Contents>{children}</Page.Contents>
|
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
}
|