ywana-core8 0.0.76 → 0.0.77

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -29,6 +29,7 @@
29
29
  "deep-equal": "^2.0.5",
30
30
  "material-design-icons-iconfont": "^6.1.1",
31
31
  "react-datepicker": "^4.6.0",
32
+ "react-notifications": "^1.7.3",
32
33
  "resumablejs": "^1.1.0"
33
34
  }
34
35
  }
package/src/site/site.js CHANGED
@@ -3,9 +3,10 @@ import { Icon } from '../html/icon'
3
3
  import { Tabs, Tab } from '../html/tab'
4
4
  import { Header } from '../html/header'
5
5
  import { Page } from './page'
6
- import './site.css'
7
6
  import { SiteContext } from './siteContext'
8
-
7
+ import { NotificationContainer, NotificationManager} from 'react-notifications'
8
+ import './site.css'
9
+ import 'react-notifications/lib/notifications.css';
9
10
 
10
11
 
11
12
  /**
@@ -66,7 +67,11 @@ export const SiteProvider = ({ children, siteLang, siteDictionary, showConsole }
66
67
  openPreview: (preview) => { setPreview(preview) },
67
68
  closePreview: () => { setPreview(null) },
68
69
 
69
- confirm: (message) => window.confirm(message)
70
+ confirm: (message) => window.confirm(message),
71
+
72
+ notify: (title, message) => {
73
+ NotificationManager.info(message, title)
74
+ }
70
75
  }
71
76
 
72
77
  return (
@@ -94,11 +99,18 @@ export const Site = ({ icon, logo, title, toolbar, children, init, min, lang, di
94
99
  <SiteConsole />
95
100
  <SiteDialog />
96
101
  <SitePreview />
102
+ <SiteNotifications />
97
103
  </div>
98
104
  </SiteProvider>
99
105
  )
100
106
  }
101
107
 
108
+ const SiteNotifications = () => {
109
+ return (
110
+ <NotificationContainer />
111
+ )
112
+ }
113
+
102
114
  /**
103
115
  * Site Header
104
116
  */