import React, { useState } from 'react';
import { PredictionCurve } from '../index';
import { Button } from 'antd';

const Demos = () => {
  const [open, setOpen] = useState(false);
  const [sensors, setSensors] = useState('出水瞬时流量');

  const onOk = () => {
    setOpen(false);
  };

  const onCancel = () => {
    setOpen(false);
  };
  return (
    <>
      <Button
        onClick={() => {
          setOpen(true);
        }}
      >
        打开预测曲线
      </Button>
      <PredictionCurve
        open={open}
        onOk={onOk}
        onCancel={onCancel}
        deviceCode={'EGBF00000120'}
        deviceType={'二供泵房'}
        sensors={sensors}
      />
    </>
  );
};

export default Demos;
