/**
 * title: ""
 * description: ""
 */
import React from 'react';
import { Button, Message, Grid } from '@alicloud/console-components';

const { Row, Col } = Grid;

const showNotice = () =>
  Message.notice({
    content: '这是一条询问消息，>=3s后主动消失',
    duration: 3000,
  });

const showSuccess = () =>
  Message.success({
    content: '这是一条询问消息，>=3s后主动消失',
    duration: 3000,
  });

const showWarning = () =>
  Message.warning({
    content: '这是一条询问消息，>=3s后主动消失',
    duration: 3000,
  });

const showError = () =>
  Message.error({
    content: '这是一条询问消息，>=3s后主动消失',
    duration: 3000,
  });

const showHelp = () =>
  Message.help({ content: '这是一条询问消息，>=3s后主动消失', duration: 3000 });

const showLoading = () =>
  Message.loading({
    content: '这是一条询问消息，>=3s后主动消失',
    duration: 3000,
  });

export default () => {
  return (
    <Row>
      <Col>
        <Button onClick={showSuccess}>Message.success</Button>
      </Col>
      <Col>
        <Button onClick={showWarning}>Message.warning</Button>
      </Col>
      <Col>
        <Button onClick={showError}>Message.error</Button>
      </Col>
      <Col>
        <Button onClick={showNotice}>Message.notice</Button>
      </Col>
      <Col>
        <Button onClick={showHelp}>Message.help</Button>
      </Col>
      <Col>
        <Button onClick={showLoading}>Message.loading</Button>
      </Col>
    </Row>
  );
};


