-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* reactjs-popup v1.0.6 | ||
* reactjs-popup v1.0.7 | ||
* (c) 2018-present Youssouf EL AZIZI <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -423,11 +423,13 @@ class Popup extends React.PureComponent { | |
render() { | ||
const { | ||
overlayStyle, | ||
closeOnDocumentClick | ||
closeOnDocumentClick, | ||
on | ||
} = this.props; | ||
const { | ||
modal | ||
} = this.state; | ||
const overlay = this.state.isOpen && !on.includes("hover") && closeOnDocumentClick; | ||
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; | ||
return [this.state.isOpen && React.createElement("div", { | ||
key: "H", | ||
|
@@ -437,11 +439,11 @@ class Popup extends React.PureComponent { | |
left: "0px" | ||
}, | ||
ref: this.setHelperRef | ||
}), this.state.isOpen && React.createElement("div", { | ||
}), overlay && React.createElement("div", { | ||
key: "O", | ||
className: "popup-overlay", | ||
style: Object.assign({}, ovStyle, overlayStyle), | ||
onClick: closeOnDocumentClick ? this.closePopup : undefined | ||
onClick: this.closePopup | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
|
@@ -460,7 +462,7 @@ Object.defineProperty(Popup, "defaultProps", { | |
onClose: () => {}, | ||
defaultOpen: false, | ||
open: false, | ||
closeOnDocumentClick: false, | ||
closeOnDocumentClick: true, | ||
closeOnEscape: true, | ||
on: ["click"], | ||
contentStyle: {}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* reactjs-popup v1.0.6 | ||
* reactjs-popup v1.0.7 | ||
* (c) 2018-present Youssouf EL AZIZI <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -419,11 +419,13 @@ class Popup extends React.PureComponent { | |
render() { | ||
const { | ||
overlayStyle, | ||
closeOnDocumentClick | ||
closeOnDocumentClick, | ||
on | ||
} = this.props; | ||
const { | ||
modal | ||
} = this.state; | ||
const overlay = this.state.isOpen && !on.includes("hover") && closeOnDocumentClick; | ||
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; | ||
return [this.state.isOpen && React.createElement("div", { | ||
key: "H", | ||
|
@@ -433,11 +435,11 @@ class Popup extends React.PureComponent { | |
left: "0px" | ||
}, | ||
ref: this.setHelperRef | ||
}), this.state.isOpen && React.createElement("div", { | ||
}), overlay && React.createElement("div", { | ||
key: "O", | ||
className: "popup-overlay", | ||
style: Object.assign({}, ovStyle, overlayStyle), | ||
onClick: closeOnDocumentClick ? this.closePopup : undefined | ||
onClick: this.closePopup | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
|
@@ -456,7 +458,7 @@ Object.defineProperty(Popup, "defaultProps", { | |
onClose: () => {}, | ||
defaultOpen: false, | ||
open: false, | ||
closeOnDocumentClick: false, | ||
closeOnDocumentClick: true, | ||
closeOnEscape: true, | ||
on: ["click"], | ||
contentStyle: {}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* reactjs-popup v1.0.6 | ||
* reactjs-popup v1.0.7 | ||
* (c) 2018-present Youssouf EL AZIZI <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -424,11 +424,13 @@ | |
render() { | ||
const { | ||
overlayStyle, | ||
closeOnDocumentClick | ||
closeOnDocumentClick, | ||
on | ||
} = this.props; | ||
const { | ||
modal | ||
} = this.state; | ||
const overlay = this.state.isOpen && !on.includes("hover") && closeOnDocumentClick; | ||
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; | ||
return [this.state.isOpen && React.createElement("div", { | ||
key: "H", | ||
|
@@ -438,11 +440,11 @@ | |
left: "0px" | ||
}, | ||
ref: this.setHelperRef | ||
}), this.state.isOpen && React.createElement("div", { | ||
}), overlay && React.createElement("div", { | ||
key: "O", | ||
className: "popup-overlay", | ||
style: Object.assign({}, ovStyle, overlayStyle), | ||
onClick: closeOnDocumentClick ? this.closePopup : undefined | ||
onClick: this.closePopup | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
|
@@ -461,7 +463,7 @@ | |
onClose: () => {}, | ||
defaultOpen: false, | ||
open: false, | ||
closeOnDocumentClick: false, | ||
closeOnDocumentClick: true, | ||
closeOnEscape: true, | ||
on: ["click"], | ||
contentStyle: {}, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters