PanelHeaderMenuWrapper.tsx 588 B

12345678910111213141516171819202122
  1. import React, { FC } from 'react';
  2. import { DashboardModel, PanelModel } from '../../state';
  3. import { PanelHeaderMenu } from './PanelHeaderMenu';
  4. import { PanelHeaderMenuProvider } from './PanelHeaderMenuProvider';
  5. interface Props {
  6. panel: PanelModel;
  7. dashboard: DashboardModel;
  8. onClose: () => void;
  9. }
  10. export const PanelHeaderMenuWrapper: FC<Props> = ({ panel, dashboard }) => {
  11. return (
  12. <PanelHeaderMenuProvider panel={panel} dashboard={dashboard}>
  13. {({ items }) => {
  14. return <PanelHeaderMenu items={items} />;
  15. }}
  16. </PanelHeaderMenuProvider>
  17. );
  18. };