module.tsx 576 B

123456789101112131415161718192021222324252627
  1. import React, { PureComponent } from 'react';
  2. import { PanelProps } from 'app/features/dashboard/dashgrid/DataPanel';
  3. export class Graph2 extends PureComponent<PanelProps> {
  4. constructor(props) {
  5. super(props);
  6. }
  7. render() {
  8. const { data } = this.props;
  9. let value = 0;
  10. if (data.length) {
  11. value = data[0].value;
  12. }
  13. return <h2>Text Panel {value}</h2>;
  14. }
  15. }
  16. export class TextOptions extends PureComponent<any> {
  17. render() {
  18. return <p>Text2 Options component</p>;
  19. }
  20. }
  21. export { Graph2 as PanelComponent, TextOptions as PanelOptions };