Socket
Socket
Sign inDemoInstall

react-portal

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-portal - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

6

examples/index.js

@@ -13,2 +13,6 @@ var React = require('react');

onClose: function() {
console.log('Portal closed');
},
render: function() {

@@ -41,3 +45,3 @@ var button1 = <button>Open portal with pseudo modal</button>;

<Portal closeOnOutsideClick={true} openByClickOn={button2}>
<Portal closeOnOutsideClick={true} openByClickOn={button2} onClose={this.onClose}>
<div style={{border: '1px solid black', margin: 10, padding: 10}}>

@@ -44,0 +48,0 @@ <p>Click anywhere outside of this portal to close it.</p>

@@ -94,2 +94,6 @@ import React, {findDOMNode} from 'react';

this.setState({active: false});
if (this.props.onClose) {
this.props.onClose();
}
}

@@ -118,3 +122,4 @@

closeOnOutsideClick: React.PropTypes.bool,
isOpened: React.PropTypes.bool
isOpened: React.PropTypes.bool,
onClose: React.PropTypes.func
};

@@ -121,0 +126,0 @@

2

package.json

@@ -6,3 +6,3 @@ {

"author": "Vojtech Miksu",
"version": "0.4.0",
"version": "0.4.1",
"license": "MIT",

@@ -9,0 +9,0 @@ "repository": {

@@ -131,2 +131,6 @@ 'use strict';

this.setState({ active: false });
if (this.props.onClose) {
this.props.onClose();
}
}

@@ -165,3 +169,4 @@ }, {

closeOnOutsideClick: _React$findDOMNode2['default'].PropTypes.bool,
isOpened: _React$findDOMNode2['default'].PropTypes.bool
isOpened: _React$findDOMNode2['default'].PropTypes.bool,
onClose: _React$findDOMNode2['default'].PropTypes.func
};

@@ -168,0 +173,0 @@

@@ -89,2 +89,5 @@ React-portal

#### onClose: func (optional)
This callback is called when the portal closes.
## Tips & Tricks

@@ -123,2 +126,3 @@ - Does your modal have a fullscreen overlay and the `closeOnOutsideClick` doesn't work? [There is a simple solution](https://github.com/tajo/react-portal/issues/2#issuecomment-92058826).

npm install
npm install react
gulp

@@ -125,0 +129,0 @@ ```

Sorry, the diff of this file is too big to display

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