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

window.globalConfig = {
    userInfo: {OID: 1},
};
export default () => {
    const [deviceType, setDeviceType] = useState('二供泵房,二供机组');

    return (<>
            <AlarmScrollAssembly
                deviceType={deviceType}
                prefix={'报警信息：'}
                showTotal={false}
                interval={0.1}
                userAccess={true}
            />
            <Button onClick={() => {
                if (deviceType === '二供泵房') {
                    setDeviceType('二供泵房,二供机组')
                } else {
                    setDeviceType('二供泵房')
                }
            }}>点击切换</Button>
        </>

    ); // 最小宽度930px
};
