/**
 * title: "带文字链接"
 * description: "通过 open 方法唤起提醒， 提醒内容content 支持定制"
 */
import React from 'react';
import { Button, Notification } from '@alicloud/console-components';

const openNotification = (
  type?: 'success' | 'error' | 'warning' | 'notice' | 'help' | undefined,
  content: React.ReactNode = '提醒内容置于页面右上，边距各8px',
) => {
  Notification.open({
    content,
    type,
    duration: 100000,
  });
};

export default () => {
  return (
    <Button
      type="primary"
      onClick={() =>
        openNotification(
          'notice',
          <>
            运营类信息或提示类信息 <a href="/">文字链接</a>
          </>,
        )
      }
    >
      带文字链接
    </Button>
  );
};


