react-push-notification
Advanced tools
Comparing version 1.0.17 to 1.0.18
import Notifications from './notifications/Notifications'; | ||
import { addNotification } from './notifications/Storage'; | ||
export { Notifications, addNotification }; | ||
import Storage from './notifications/Storage'; | ||
export { Notifications, Storage }; |
@@ -8,3 +8,3 @@ "use strict"; | ||
exports.Notifications = Notifications_1.default; | ||
const Storage_1 = require("./notifications/Storage"); | ||
exports.addNotification = Storage_1.addNotification; | ||
const Storage_1 = __importDefault(require("./notifications/Storage")); | ||
exports.Storage = Storage_1.default; |
@@ -7,3 +7,3 @@ "use strict"; | ||
const react_1 = __importDefault(require("react")); | ||
const Storage_1 = require("./Storage"); | ||
const Storage_1 = __importDefault(require("./Storage")); | ||
require("./Notification.css"); | ||
@@ -19,3 +19,3 @@ const PushNotification_1 = __importDefault(require("./PushNotification")); | ||
componentDidMount() { | ||
Storage_1.storage.addListener((v) => this.setState({ value: v })); | ||
Storage_1.default.addListener((v) => this.setState({ value: v })); | ||
} | ||
@@ -26,3 +26,3 @@ render() { | ||
return react_1.default.createElement("div", { className: classN }, this.state.value.map((note) => { | ||
return react_1.default.createElement(PushNotification_1.default, { closeNotification: Storage_1.storage.popAndPush, id: note.id, theme: note.theme, title: note.title, subtitle: note.subtitle, message: note.message }); | ||
return react_1.default.createElement(PushNotification_1.default, { closeNotification: Storage_1.default.popAndPush, id: note.id, theme: note.theme, title: note.title, subtitle: note.subtitle, message: note.message }); | ||
})); | ||
@@ -29,0 +29,0 @@ } |
@@ -26,4 +26,3 @@ export declare type Color = 'light' | 'darkblue' | 'red' | undefined; | ||
} | ||
declare const storage: Storage; | ||
declare const addNotification: (options: Options) => void; | ||
export { storage, addNotification }; | ||
declare const _default: Storage; | ||
export default _default; |
@@ -48,7 +48,2 @@ "use strict"; | ||
} | ||
const storage = new Storage(); | ||
exports.storage = storage; | ||
const addNotification = (options) => { | ||
storage.addNotification(options); | ||
}; | ||
exports.addNotification = addNotification; | ||
exports.default = new Storage(); |
{ | ||
"name": "react-push-notification", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "React push notifications", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import Notifications from './notifications/Notifications'; | ||
import { addNotification } from './notifications/Storage'; | ||
import Storage from './notifications/Storage'; | ||
export { Notifications, addNotification }; | ||
export { Notifications, Storage }; |
@@ -68,6 +68,2 @@ | ||
const storage = new Storage(); | ||
const addNotification = (options: Options): void => { | ||
storage.addNotification(options); | ||
}; | ||
export { storage, addNotification }; | ||
export default new Storage(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17280
548