diff --git a/native/tooltip/tooltip-context.react.js b/native/tooltip/tooltip-context.react.js --- a/native/tooltip/tooltip-context.react.js +++ b/native/tooltip/tooltip-context.react.js @@ -3,6 +3,7 @@ import { useActionSheet } from '@expo/react-native-action-sheet'; import * as React from 'react'; import { Platform, StyleSheet } from 'react-native'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import type { TooltipItemBaseProps } from './tooltip-item.react.js'; @@ -74,6 +75,8 @@ optionsRef.current = optionsRef.current.filter(option => option.id !== id); }, []); + const insets = useSafeAreaInsets(); + const { cancel, hideTooltip } = props; const { showActionSheetWithOptions } = useActionSheet(); const showActionSheet = React.useCallback(() => { @@ -125,7 +128,7 @@ }; const containerStyle = { - paddingBottom: 24, + paddingBottom: insets.bottom, }; showActionSheetWithOptions( { @@ -140,9 +143,10 @@ }, [ hideTooltip, maxOptionsToDisplay, + insets.bottom, + showActionSheetWithOptions, visibleEntryIDsSet, cancel, - showActionSheetWithOptions, ]); const shouldShowMore = React.useCallback(() => {