react-modal-video
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -54,2 +54,5 @@ 'use strict'; | ||
this.setState({ isOpen: false }); | ||
if (this.props.onClose === 'function') { | ||
this.props.onClose(); | ||
} | ||
} | ||
@@ -56,0 +59,0 @@ }, { |
{ | ||
"name": "react-modal-video", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Modal Video Viewer", |
@@ -54,3 +54,3 @@ # react-modal-video | ||
<div> | ||
<ModalVideo channel='youtube' isOpen={this.state.isOpen} videoId='L61p2uyiMSo' /> | ||
<ModalVideo channel='youtube' isOpen={this.state.isOpen} videoId='L61p2uyiMSo' onClose={() => this.setState({isOpen: false})} /> | ||
<button onClick={this.openModal}>Open</button> | ||
@@ -57,0 +57,0 @@ </div> |
@@ -22,2 +22,5 @@ import React from 'react' | ||
this.setState({isOpen: false}) | ||
if (this.props.onClose === 'function') { | ||
this.props.onClose(); | ||
} | ||
} | ||
@@ -24,0 +27,0 @@ |
@@ -22,3 +22,3 @@ import React from 'react' | ||
<div> | ||
<ModalVideo channel='youtube' isOpen={this.state.isOpen} videoId='L61p2uyiMSo' /> | ||
<ModalVideo channel='youtube' isOpen={this.state.isOpen} videoId='L61p2uyiMSo' onClose={() => this.setState({isOpen: false})} /> | ||
<button onClick={this.openModal}>Open</button> | ||
@@ -25,0 +25,0 @@ </div> |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
883364
20659
0