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

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

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

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