1 line
22 KiB
JSON
1 line
22 KiB
JSON
|
{"ast":null,"code":"import _slicedToArray from \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\n\nvar _this = this,\n _jsxFileName = \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/MessagesDemo.js\";\n\nimport React, { useRef, useState } from 'react';\nimport { Toast } from 'primereact/toast';\nimport { Messages } from 'primereact/messages';\nimport { Message } from 'primereact/message';\nimport { InputText } from 'primereact/inputtext';\nimport { Button } from 'primereact/button';\n\nvar MessagesDemo = function MessagesDemo() {\n var _useState = useState(''),\n _useState2 = _slicedToArray(_useState, 2),\n username = _useState2[0],\n setUsername = _useState2[1];\n\n var _useState3 = useState(''),\n _useState4 = _slicedToArray(_useState3, 2),\n email = _useState4[0],\n setEmail = _useState4[1];\n\n var toast = useRef();\n var message = useRef();\n\n var addSuccessMessage = function addSuccessMessage() {\n message.current.show({\n severity: 'success',\n content: 'Message Detail'\n });\n };\n\n var addInfoMessage = function addInfoMessage() {\n message.current.show({\n severity: 'info',\n content: 'Message Detail'\n });\n };\n\n var addWarnMessage = function addWarnMessage() {\n message.current.show({\n severity: 'warn',\n content: 'Message Detail'\n });\n };\n\n var addErrorMessage = function addErrorMessage() {\n message.current.show({\n severity: 'error',\n content: 'Message Detail'\n });\n };\n\n var showSuccess = function showSuccess() {\n toast.current.show({\n severity: 'success',\n summary: 'Success Message',\n detail: 'Message Detail',\n life: 3000\n });\n };\n\n var showInfo = function showInfo() {\n toast.current.show({\n severity: 'info',\n summary: 'Info Message',\n detail: 'Message Detail',\n life: 3000\n });\n };\n\n var showWarn = function showWarn() {\n toast.current.show({\n severity: 'warn',\n summary: 'Warn Message',\n detail: 'Message Detail',\n life: 3000\n });\n };\n\n var showError = function showError() {\n toast.current.show({\n severity: 'error',\n summary: 'Error Message',\n detail: 'Message Detail',\n life: 3000\n });\n };\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"grid\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-12 lg:col-6\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"card\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(\"h5\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 21\n }\n }, \"Toast\"), /*#__PURE__*/React.createElement(Toast, {\n ref: toast,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 21\n }\n }), /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n onClick: showSuccess,\n label: \"Success\",\n className: \"p-button-success mr-2\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 21\n }\n }), /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n onClick: showInfo,\n label: \"Info\",\n className: \"p-button-info mr-2\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 21\n }\n }), /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n
|