@grafana/runtime
Version:
Grafana Runtime Library
1 lines • 1.34 kB
Source Map (JSON)
{"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,UAAA,GAA6B,CAAC,EAAE,QAAA,EAAS,KAAM;AACxD,EAAA,uBAAO,GAAA,CAAC,SAAK,QAAA,EAAS,CAAA;AACxB;AAQO,SAAS,cAAc,SAAA,EAA2B;AACvD,EAAA,UAAA,GAAa,SAAA;AACf;;;;"}