import * as React from 'react';
import { Col, Button, Row, notification } from '@btri-ui/base';
export default () => {
  const showMsg = placement => {
    notification.info({
      message: '用于表示普通操作信息提示',
      description: '用于表示普通操作信息提示具体提示内容。',
      placement,
      onCancle: () => {
        console.log('cancle');
      },
      onOk: () => {
        alert('ok');
      },
    });
  };

  const placementList = [
    { placement: 'topLeft' },
    { placement: 'topRight' },
    { placement: 'bottomLeft' },
    { placement: 'bottomRight' },
  ];

  return (
    <>
      <Row autoMode={true}>
        {placementList.map(item => {
          return (
            <Col span={4} key={item.placement}>
              <Button
                type="primary"
                onClick={() => {
                  showMsg(item.placement);
                }}
              >
                {item.placement}
              </Button>
            </Col>
          );
        })}
      </Row>
    </>
  );
};
