grafana/public/app/core/components/PageNew/PluginPage.tsx
Ashley Harrison b3c761aaa7
Navigation: Expose new props to extend Page/PluginPage (#58465)
* add extensions and customisation to `Page`

* adjust alignment
2022-11-09 09:05:01 +00:00

25 lines
663 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({ 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>
);
}