import { PluginPage, usePluginComponent } from '@grafana/runtime'; import { testIds } from '../testIds'; type ReusableComponentProps = { name: string; }; export function ExposedComponents() { const { component: ReusableComponent } = usePluginComponent( 'grafana-extensionexample1-app/reusable-component/v1' ); const { component: AddToDashboardForm } = usePluginComponent('grafana/add-to-dashboard-form/v1'); if (!ReusableComponent) { return null; } return (
{AddToDashboardForm && (

Save to dashboard (exposed form)

({ type: 'timeseries', title: 'E2E Add to Dashboard Panel', targets: [], })} // Ensure navigation works correctly from plugin page options={{ useAbsolutePath: true }} onClose={() => {}} />
)}
); }