module.tsx 675 B

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