mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
* some type fixes * restore empty object * undo 1 fix for now * commit betterer update * explicitly type slug and uid as string | undefined
33 lines
662 B
TypeScript
33 lines
662 B
TypeScript
import React, { PureComponent } from 'react';
|
|
|
|
import { CanvasElementItem, CanvasElementProps } from '../element';
|
|
|
|
class NotFoundDisplay extends PureComponent<CanvasElementProps> {
|
|
render() {
|
|
const { config } = this.props;
|
|
return (
|
|
<div>
|
|
<h3>NOT FOUND:</h3>
|
|
<pre>{JSON.stringify(config, null, 2)}</pre>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export const notFoundItem: CanvasElementItem = {
|
|
id: 'not-found',
|
|
name: 'Not found',
|
|
description: 'Display when element type is not found in the registry',
|
|
|
|
display: NotFoundDisplay,
|
|
|
|
defaultSize: {
|
|
width: 100,
|
|
height: 100,
|
|
},
|
|
|
|
getNewOptions: () => ({
|
|
config: {},
|
|
}),
|
|
};
|