diff --git a/packages/grafana-ui/src/components/Drawer/Drawer.tsx b/packages/grafana-ui/src/components/Drawer/Drawer.tsx index 1616b595594..d05ab950590 100644 --- a/packages/grafana-ui/src/components/Drawer/Drawer.tsx +++ b/packages/grafana-ui/src/components/Drawer/Drawer.tsx @@ -4,7 +4,7 @@ import RcDrawer from 'rc-drawer'; import { css } from 'emotion'; import { stylesFactory, useTheme, selectThemeVariant } from '../../themes'; -interface Props { +export interface Props { children: ReactNode; /** Title shown at the top of the drawer */ title?: string; diff --git a/packages/grafana-ui/src/components/index.ts b/packages/grafana-ui/src/components/index.ts index 50747bc0dd2..724b3f05023 100644 --- a/packages/grafana-ui/src/components/index.ts +++ b/packages/grafana-ui/src/components/index.ts @@ -110,6 +110,7 @@ export { SlideOutTransition } from './transitions/SlideOutTransition'; export { Segment, SegmentAsync, SegmentInput, SegmentSelect } from './Segment/'; export { default as Chart } from './Chart'; export { Icon } from './Icon/Icon'; +export { Drawer } from './Drawer/Drawer'; // Next-gen forms export { default as Forms } from './Forms'; diff --git a/public/app/features/dashboard/components/Inspector/PanelInspector.tsx b/public/app/features/dashboard/components/Inspector/PanelInspector.tsx index 0fdfb481737..58c2c851c5c 100644 --- a/public/app/features/dashboard/components/Inspector/PanelInspector.tsx +++ b/public/app/features/dashboard/components/Inspector/PanelInspector.tsx @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import { DashboardModel, PanelModel } from 'app/features/dashboard/state'; -import { JSONFormatter, Modal } from '@grafana/ui'; +import { Drawer, JSONFormatter } from '@grafana/ui'; import { css } from 'emotion'; import { getLocationSrv } from '@grafana/runtime'; @@ -11,13 +11,7 @@ interface Props { panel: PanelModel; } -interface State {} - -export class PanelInspector extends PureComponent { - constructor(props: Props) { - super(props); - } - +export class PanelInspector extends PureComponent { onDismiss = () => { getLocationSrv().update({ query: { inspect: null }, @@ -39,11 +33,11 @@ export class PanelInspector extends PureComponent { // TODO? should we get the result with an observable once? const data = (panel.getQueryRunner() as any).lastResult; return ( - +
-
+ ); } }