UNPKG

yzsd

Version:
24 lines 846 B
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; /** * title: 基本 * description: 最简单的用法,4.5 秒后自动关闭 */ import React from 'react'; import { Notification, Button } from 'yzsd'; var App = function App() { var _Notification = Notification({ closable: true }), _Notification2 = _slicedToArray(_Notification, 2), notice = _Notification2[0], holder = _Notification2[1]; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(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); }; export default App;