diff --git a/src/Popup.js b/src/Popup.js index c7698de..591ac46 100644 --- a/src/Popup.js +++ b/src/Popup.js @@ -252,6 +252,11 @@ export default class Popup extends React.PureComponent { const overlay = this.state.isOpen && !(on.indexOf("hover") >= 0); const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; return [ + !!this.props.trigger && ( + + {this.renderTrigger()} + + ), this.state.isOpen && (
), this.state.isOpen && !modal && this.renderContent(), - !!this.props.trigger && ( - - {this.renderTrigger()} - - ) ]; } } diff --git a/stories/src/BoundedTooltip.js b/stories/src/BoundedTooltip.js index 2071c17..3ae2ea1 100644 --- a/stories/src/BoundedTooltip.js +++ b/stories/src/BoundedTooltip.js @@ -19,12 +19,12 @@ export default class BoundedTooltip extends React.Component { position={this.props.position} //open={this.state.open} closeOnDocumentClick - keepTooltipInside={false} + keepTooltipInside={true} // onClose={this.closeModal} > {close => (
- + × remove Lorem ipsum dolor sit amet, consectur adipisicing elit. Beatae magni