import './demo2.css';
import Button from '../../button';
import Message from '..';
import React from 'react';
import ReactDOM from 'react-dom';

const notice = () => {
  Message.notice({
    type: 'error',
    title: '提示信息',
    content: '请联系相关人员反馈！',
    closeable: true,
    duration: 0,
  });
};

const hide = () => {
  Message.hide();
};

ReactDOM.render(
  <div>
    <Button type="primary" onClick={notice}>
      显示toast提示
    </Button>
    <br />
    <br />
    <Button type="primary" onClick={hide}>
      隐藏toast提示
    </Button>
  </div>,
  document.getElementById('message-demo-2'),
);
