arengibook 2.5.8 → 2.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +39 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -42751,6 +42751,42 @@ var showToast = function showToast(props) {
42751
42751
  document.body.appendChild(container);
42752
42752
  ReactDOM.render(/*#__PURE__*/React__default.createElement(ToastContainer, null), container);
42753
42753
  }
42754
+ var getIconByType = function getIconByType() {
42755
+ switch (props.type) {
42756
+ case "success":
42757
+ return "pi pi-check-circle";
42758
+ case "error":
42759
+ return "pi pi-times-circle";
42760
+ case "settingError":
42761
+ return "pi pi-cog pi-times-circle";
42762
+ case "warning":
42763
+ return "pi pi-exclamation-triangle";
42764
+ case "processing":
42765
+ return "pi pi-spinner pi-spin";
42766
+ case "info":
42767
+ default:
42768
+ return "pi pi-info-circle";
42769
+ }
42770
+ };
42771
+ var _content2 = /*#__PURE__*/React__default.createElement("div", {
42772
+ className: "toast-root"
42773
+ }, /*#__PURE__*/React__default.createElement("div", {
42774
+ className: "toast-left"
42775
+ }, /*#__PURE__*/React__default.createElement("i", {
42776
+ className: getIconByType(),
42777
+ "aria-hidden": "true"
42778
+ })), /*#__PURE__*/React__default.createElement("div", {
42779
+ className: "toast-body"
42780
+ }, props.title && /*#__PURE__*/React__default.createElement("div", {
42781
+ className: "toast-title"
42782
+ }, props.title), /*#__PURE__*/React__default.createElement("div", {
42783
+ className: "toast-message"
42784
+ }, /*#__PURE__*/React__default.createElement("div", {
42785
+ className: "toast-html-content",
42786
+ dangerouslySetInnerHTML: {
42787
+ __html: props.message
42788
+ }
42789
+ }))));
42754
42790
  setTimeout(function () {
42755
42791
  if (toastRef) {
42756
42792
  toastRef.show({
@@ -42758,22 +42794,9 @@ var showToast = function showToast(props) {
42758
42794
  life: props.duration || 3000,
42759
42795
  sticky: props.sticky,
42760
42796
  closable: props.closable !== false,
42761
- summary: props.title || '',
42762
- content: /*#__PURE__*/React__default.createElement("div", {
42763
- className: "p-toast-message-content",
42764
- style: {
42765
- display: 'flex',
42766
- flexDirection: 'column',
42767
- justifyContent: 'center'
42768
- }
42769
- }, props.title && /*#__PURE__*/React__default.createElement("span", {
42770
- className: "p-toast-summary"
42771
- }, props.title), /*#__PURE__*/React__default.createElement("div", {
42772
- className: "p-toast-detail",
42773
- dangerouslySetInnerHTML: {
42774
- __html: props.message
42775
- }
42776
- }))
42797
+ content: function content() {
42798
+ return _content2;
42799
+ }
42777
42800
  });
42778
42801
  }
42779
42802
  }, 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.5.8",
4
+ "version": "2.5.9",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {