UNPKG

yzsd

Version:
33 lines (31 loc) 1.18 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); var _react = _interopRequireDefault(require("react")); var _yzsd = require("yzsd"); /** * title: 基本 * description: 最简单的用法,4.5 秒后自动关闭 */ var App = function App() { var _Notification = (0, _yzsd.Notification)({ closable: true }), _Notification2 = (0, _slicedToArray2["default"])(_Notification, 2), notice = _Notification2[0], holder = _Notification2[1]; return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_yzsd.Button, { type: 'primary', onClick: function onClick() { notice.open({ content: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.' }); } }, "Open the notification box"), holder); }; var _default = App; exports["default"] = _default;