Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-push-notification

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-push-notification - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

4

dist/index.d.ts
import Notifications from './notifications/Notifications';
import Storage from './notifications/Storage';
export { Notifications, Storage };
import { addNotification } from './notifications/Storage';
export { Notifications, addNotification };

@@ -8,3 +8,3 @@ "use strict";

exports.Notifications = Notifications_1.default;
const Storage_1 = __importDefault(require("./notifications/Storage"));
exports.Storage = Storage_1.default;
const Storage_1 = require("./notifications/Storage");
exports.addNotification = Storage_1.addNotification;
import React from 'react';
import { Notification } from './Storage';
import './Notification.css';
import './styles/Notification.css';
declare type Position = 'top-left' | 'top-middle' | 'top-right' | 'bottom-left' | 'bottom-middle' | 'bottom-right';

@@ -5,0 +5,0 @@ interface Props {

@@ -7,4 +7,4 @@ "use strict";

const react_1 = __importDefault(require("react"));
const Storage_1 = __importDefault(require("./Storage"));
require("./Notification.css");
const Storage_1 = require("./Storage");
require("./styles/Notification.css");
const PushNotification_1 = __importDefault(require("./PushNotification"));

@@ -19,3 +19,3 @@ class Notifications extends react_1.default.Component {

componentDidMount() {
Storage_1.default.addListener((v) => this.setState({ value: v }));
Storage_1.storage.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.default.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.storage.popAndPush, id: note.id, theme: note.theme, title: note.title, subtitle: note.subtitle, message: note.message });
}));

@@ -29,0 +29,0 @@ }

@@ -26,3 +26,4 @@ export declare type Color = 'light' | 'darkblue' | 'red' | undefined;

}
declare const _default: Storage;
export default _default;
declare const storage: Storage;
declare const addNotification: (options: Options) => void;
export { storage, addNotification };

@@ -48,2 +48,7 @@ "use strict";

}
exports.default = new Storage();
const storage = new Storage();
exports.storage = storage;
const addNotification = (options) => {
storage.addNotification(options);
};
exports.addNotification = addNotification;
{
"name": "react-push-notification",
"version": "1.0.15",
"version": "1.0.16",
"description": "React push notifications",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

import Notifications from './notifications/Notifications';
import Storage from './notifications/Storage';
import { addNotification } from './notifications/Storage';
export { Notifications, Storage };
export { Notifications, addNotification };

@@ -68,2 +68,6 @@

export default new Storage();
const storage = new Storage();
const addNotification = (options: Options): void => {
storage.addNotification(options);
};
export { storage, addNotification };

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc