import * as React from 'react';
import { Col, Button, Row, message } from '@btri-ui/base';
import { Icon } from '@btri-ui/base';

export default () => {
  const showMsg = () => {
    message.info({
      content: '用于表示普通操作信息提示',
      closeIcon: <Icon iconName="CloseBig" />,
      duration: 0,
    });
  };
  const showMsg2 = () => {
    message.info({
      content: '用于表示普通操作信息提示，通常信息较长，可撤销',
      closeIcon: <div style={{ color: 'var(--primary-6)' }}>撤销</div>,
      duration: 0,
    });
  };
  return (
    <>
      <Row autoMode={true}>
        <Col span={2}>
          <Button
            type="primary"
            onClick={() => {
              showMsg();
            }}
          >
            打开全局提示
          </Button>
        </Col>
        <Col span={2}>
          <Button
            type="primary"
            onClick={() => {
              showMsg2();
            }}
          >
            打开全局提示
          </Button>
        </Col>
      </Row>
    </>
  );
};
