module.tsx 430 B

123456789101112131415161718192021
  1. import React, { PureComponent } from 'react';
  2. import { PanelProps } from 'app/features/dashboard/dashgrid/DataPanel';
  3. export class Text2 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>Graph Panel! {value}</h2>;
  14. }
  15. }
  16. export { Text2 as PanelComponent };