Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32212387
D12976.1765141011.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D12976.1765141011.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 8:56 PM (7 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5846042
Default Alt Text
D12976.1765141011.diff (2 KB)
Attached To
Mode
D12976: [native] Move contentContainerStyle
Attached
Detach File
Event Timeline
Log In to Comment