Page MenuHomePhorge

D12976.1765145466.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D12976.1765145466.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
@@ -86,6 +86,7 @@
+overlayContext: ?OverlayContextType,
+styles: $ReadOnly<typeof unboundStyles>,
+closeTip: () => mixed,
+ +contentContainerStyle: ViewStyle,
};
function createNUXTipsOverlay(
@@ -159,19 +160,6 @@
};
}
- get contentContainerStyle(): ViewStyle {
- const { verticalBounds } = this.props.route.params;
- const fullScreenHeight = this.props.dimensions.height;
- const top = verticalBounds.y;
- const bottom =
- fullScreenHeight - verticalBounds.y - verticalBounds.height;
- return {
- ...this.props.styles.contentContainer,
- marginTop: top,
- marginBottom: bottom,
- };
- }
-
get buttonStyle(): ViewStyle {
const { params } = this.props.route;
const { initialCoordinates, verticalBounds } = params;
@@ -224,6 +212,7 @@
overlayContext,
styles,
closeTip,
+ contentContainerStyle,
...navAndRouteForFlow
} = this.props;
@@ -273,7 +262,7 @@
<TouchableWithoutFeedback onPress={this.props.closeTip}>
<View style={styles.container}>
<AnimatedView style={this.opacityStyle} />
- <View style={this.contentContainerStyle}>
+ <View style={this.props.contentContainerStyle}>
<View style={this.buttonStyle}>
<ButtonComponent {...buttonProps} />
</View>
@@ -310,6 +299,19 @@
const styles = useStyles(unboundStyles);
+ const contentContainerStyle = React.useMemo(() => {
+ const { verticalBounds } = props.route.params;
+ const fullScreenHeight = dimensions.height;
+ const top = verticalBounds.y;
+ const bottom =
+ fullScreenHeight - verticalBounds.y - verticalBounds.height;
+ return {
+ ...styles.contentContainer,
+ marginTop: top,
+ marginBottom: bottom,
+ };
+ }, [dimensions.height, props.route.params, styles.contentContainer]);
+
return (
<NUXTipsOverlay
{...props}
@@ -317,6 +319,7 @@
overlayContext={overlayContext}
styles={styles}
closeTip={goBackOnce}
+ contentContainerStyle={contentContainerStyle}
/>
);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 10:11 PM (11 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5846042
Default Alt Text
D12976.1765145466.diff (2 KB)

Event Timeline