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

@wildberries/notifications

Package Overview
Dependencies
Maintainers
5
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wildberries/notifications - npm Package Compare versions

Comparing version 1.0.11-beta.1 to 1.0.11

22

package.json
{
"name": "@wildberries/notifications",
"version": "1.0.11-beta.1",
"version": "1.0.11",
"description": "notifications module",

@@ -40,11 +40,11 @@ "main": "dist/index.js",

"@commitlint/cli": "9.1.2",
"@storybook/addon-actions": "6.0.26",
"@storybook/addon-console": "1.2.2",
"@storybook/addon-docs": "6.0.26",
"@storybook/addon-essentials": "6.0.26",
"@storybook/addon-knobs": "6.0.26",
"@storybook/addon-links": "6.0.26",
"@storybook/addon-actions": "6.1.21",
"@storybook/addon-console": "1.2.3",
"@storybook/addon-docs": "6.1.21",
"@storybook/addon-essentials": "6.1.21",
"@storybook/addon-knobs": "6.1.21",
"@storybook/addon-links": "6.1.21",
"@types/uniqid": "5.2.0",
"@storybook/addon-viewport": "6.0.26",
"@storybook/react": "6.0.26",
"@storybook/addon-viewport": "6.1.21",
"@storybook/react": "6.1.21",
"@types/classnames": "2.2.10",

@@ -89,2 +89,4 @@ "@types/jest": "24.9.1",

"sass-loader": "10.0.2",
"react": "16.12.0",
"react-dom": "16.12.0",
"style-loader": "1.2.1",

@@ -102,4 +104,2 @@ "stylelint": "13.3.3",

"classnames": "2.2.6",
"react": "16.13.0",
"react-dom": "16.13.0",
"react-redux": "7.2.0",

@@ -106,0 +106,0 @@ "redux": "4.0.5",

@@ -33,32 +33,7 @@ # @wildberries/notifications

import React, { memo } from "react";
import { Notifications, setModalAction } from "@wildberries/notifications";
import { createPortal } from 'react-dom';
import { uniqueId } from 'lodash-es'
import { Notifications } from "@wildberries/notifications";
const portalElement = document.getElementById('portal');
// example Portal component - you will need the DIV that will be appended by notifications
class Portal extends React.PureComponent{
constructor(props) {
super(props);
this.containerEl = document.createElement('div');
this.containerEl.id = `${props.prefix}_${uniqueId('id_')}`;
portalElement.appendChild(this.containerEl);
}
componentWillUnmount() {
this.containerEl.remove();
}
render() {
return createPortal(this.props.children, this.containerEl);
}
}
const TestComponent = memo(() => (
<div className="TestComponent">
<Portal prefix="notifications">
<Notifications />
</Portal>
</div>

@@ -65,0 +40,0 @@ );

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