diff --git a/native/tooltip/nux-tips-overlay.react.js b/native/tooltip/nux-tips-overlay.react.js --- a/native/tooltip/nux-tips-overlay.react.js +++ b/native/tooltip/nux-tips-overlay.react.js @@ -13,9 +13,11 @@ } from 'react-native-reanimated'; import { + getNUXTipParams, NUXTipsContext, type NUXTip, } from '../components/nux-tips-context.react.js'; +import PrimaryButton from '../components/primary-button.react.js'; import type { AppNavigationProp } from '../navigation/app-navigator.react.js'; import { OverlayContext } from '../navigation/overlay-context.js'; import type { @@ -52,6 +54,7 @@ backgroundColor: 'tooltipBackground', borderRadius: 5, overflow: 'hidden', + padding: 20, }, triangleUp: { borderBottomColor: 'tooltipBackground', @@ -84,7 +87,11 @@ tipText: { color: 'panelForegroundLabel', fontSize: 20, - padding: 15, + marginBottom: 10, + }, + buttonContainer: { + width: 100, + alignSelf: 'flex-end', }, }; @@ -346,6 +353,28 @@ triangleUp = ; } + const callbackParams = getNUXTipParams(route.params.tipKey); + + const onPressOk = React.useCallback(() => { + const { + nextTip, + tooltipLocation: nextLocation, + nextRouteName, + } = callbackParams; + goBackOnce(); + + if (!nextTip || !nextRouteName) { + return; + } + navigation.navigate({ + name: nextRouteName, + params: { + tipKey: nextTip, + tooltipLocation: nextLocation, + }, + }); + }, [callbackParams, goBackOnce, navigation]); + return ( @@ -372,6 +401,13 @@ {triangleUp} {tipText} + + + {triangleDown}