Page MenuHomePhabricator

D13080.id43472.diff
No OneTemporary

D13080.id43472.diff

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
@@ -12,7 +12,9 @@
type ExitAnimationsValues,
} from 'react-native-reanimated';
+import LoadingButton from '../components/loading-button.react.js';
import {
+ getNUXTipParams,
NUXTipsContext,
type NUXTip,
} from '../components/nux-tips-context.react.js';
@@ -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 = <View style={[styles.triangleUp, triangleStyle]} />;
}
+ const callbackParams = getNUXTipParams(route.params.tipKey);
+
+ const onPressOk = React.useCallback(() => {
+ const {
+ nextTip,
+ tooltipLocation: nextLocation,
+ nextRouteName,
+ } = callbackParams;
+ goBackOnce();
+
+ if (!nextTip || !nextRouteName) {
+ return;
+ }
+ navigation.navigate<NUXTipRouteNames>({
+ name: nextRouteName,
+ params: {
+ tipKey: nextTip,
+ tooltipLocation: nextLocation,
+ },
+ });
+ }, [callbackParams, goBackOnce, navigation]);
+
return (
<TouchableWithoutFeedback onPress={goBackOnce}>
<View style={styles.container}>
@@ -372,6 +401,13 @@
{triangleUp}
<View style={styles.items}>
<Text style={styles.tipText}>{tipText}</Text>
+ <View style={styles.buttonContainer}>
+ <LoadingButton
+ onPress={onPressOk}
+ label="Next"
+ variant="enabled"
+ />
+ </View>
</View>
{triangleDown}
</AnimatedView>

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 19, 3:25 PM (20 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2323635
Default Alt Text
D13080.id43472.diff (2 KB)

Event Timeline