react-native-walkthrough-tooltip
Advanced tools
Comparing version 1.2.0 to 1.3.0
{ | ||
"name": "react-native-walkthrough-tooltip", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "An inline wrapper for calling out React Native components via tooltip", | ||
@@ -5,0 +5,0 @@ "main": "src/tooltip.js", |
@@ -126,2 +126,5 @@ // Type definitions for react-native-walkthrough-tooltip 1.0.0 | ||
accessible?: boolean; | ||
/** Will use given component instead of default react-native Modal component **/ | ||
modalComponent?: object; | ||
} | ||
@@ -128,0 +131,0 @@ |
@@ -431,6 +431,7 @@ import React, { Component } from 'react'; | ||
render() { | ||
const { children, isVisible, useReactNativeModal } = this.props; | ||
const { children, isVisible, useReactNativeModal, modalComponent } = this.props; | ||
const hasChildren = React.Children.count(children) > 0; | ||
const showTooltip = isVisible && !this.state.waitingForInteractions; | ||
const ModalComponent = modalComponent || Modal; | ||
@@ -440,3 +441,3 @@ return ( | ||
{useReactNativeModal ? ( | ||
<Modal | ||
<ModalComponent | ||
transparent | ||
@@ -448,3 +449,3 @@ visible={showTooltip} | ||
{this.renderContentForTooltip()} | ||
</Modal> | ||
</ModalComponent> | ||
) : null} | ||
@@ -451,0 +452,0 @@ |
47964
1080