UNPKG

@alicloud/console-components

Version:

Alibaba Cloud React Components

23 lines (22 loc) 928 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); /** * title: "基础形态" * description: "通过 open 方法唤起提醒, 提醒内容content 支持定制" */ var react_1 = __importDefault(require("react")); var console_components_1 = require("@alicloud/console-components"); var openNotification = function (type, content) { if (content === void 0) { content = '提醒内容置于页面右上,边距各8px'; } console_components_1.Notification.open({ content: content, type: type, duration: 100000, }); }; exports.default = (function () { return (react_1.default.createElement(console_components_1.Button, { type: "primary", onClick: function () { return openNotification('notice'); } }, "\u9ED8\u8BA4")); });