UNPKG

@grafana/runtime

Version:
1 lines 1.28 kB
{"version":3,"file":"PluginPage.mjs","sources":["../../../src/components/PluginPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { NavModelItem, PageLayoutType } from '@grafana/data';\n\nexport interface PageInfoItem {\n label: string;\n value: React.ReactNode;\n}\n\nexport interface PluginPageProps {\n /** Can be used to place actions inline with the heading */\n info?: PageInfoItem[];\n /** Can be used to place actions inline with the heading */\n actions?: React.ReactNode;\n /** Can be used to customize rendering of title */\n renderTitle?: (title: string) => React.ReactNode;\n /** Shown under main heading */\n subTitle?: React.ReactNode;\n pageNav?: NavModelItem;\n children: React.ReactNode;\n layout?: PageLayoutType;\n}\n\nexport type PluginPageType = React.ComponentType<PluginPageProps>;\n\nexport let PluginPage: PluginPageType = ({ children }) => {\n return <div>{children}</div>;\n};\n\n/**\n * Used to bootstrap the PluginPage during application start\n * is exposed via runtime.\n *\n * @internal\n */\nexport function setPluginPage(component: PluginPageType) {\n PluginPage = component;\n}\n"],"names":[],"mappings":";;AAyBO,IAAI,UAA6B,GAAA,CAAC,EAAE,QAAA,EAAe,KAAA;AACxD,EAAO,uBAAA,GAAA,CAAC,SAAK,QAAS,EAAA,CAAA;AACxB;;;;"}