Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32221604
D12979.1765198730.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
D12979.1765198730.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
@@ -85,6 +85,7 @@
+closeTip: () => mixed,
+contentContainerStyle: ViewStyle,
+opacityStyle: AnimatedViewStyle,
+ +buttonStyle: ViewStyle,
};
function createNUXTipsOverlay(
@@ -143,18 +144,6 @@
);
}
- get buttonStyle(): ViewStyle {
- const { params } = this.props.route;
- const { initialCoordinates, verticalBounds } = params;
- const { x, y, width, height } = initialCoordinates;
- return {
- width: Math.ceil(width),
- height: Math.ceil(height),
- marginTop: y - verticalBounds.y,
- marginLeft: x,
- };
- }
-
get tipContainerStyle(): AnimatedViewStyle {
const { dimensions, route } = this.props;
const { initialCoordinates, verticalBounds } = route.params;
@@ -197,6 +186,7 @@
closeTip,
contentContainerStyle,
opacityStyle,
+ buttonStyle,
...navAndRouteForFlow
} = this.props;
@@ -244,7 +234,7 @@
<View style={styles.container}>
<AnimatedView style={opacityStyle} />
<View style={this.props.contentContainerStyle}>
- <View style={this.buttonStyle}>
+ <View style={buttonStyle}>
<ButtonComponent {...buttonProps} />
</View>
</View>
@@ -307,6 +297,18 @@
};
}, [position, styles.backdrop]);
+ const { initialCoordinates, verticalBounds } = props.route.params;
+
+ const buttonStyle = React.useMemo(() => {
+ const { x, y, width, height } = initialCoordinates;
+ return {
+ width: Math.ceil(width),
+ height: Math.ceil(height),
+ marginTop: y - verticalBounds.y,
+ marginLeft: x,
+ };
+ }, [initialCoordinates, verticalBounds]);
+
return (
<NUXTipsOverlay
{...props}
@@ -316,6 +318,7 @@
closeTip={goBackOnce}
contentContainerStyle={contentContainerStyle}
opacityStyle={opacityStyle}
+ buttonStyle={buttonStyle}
/>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 12:58 PM (3 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848359
Default Alt Text
D12979.1765198730.diff (2 KB)
Attached To
Mode
D12979: [native] Move buttonStyle
Attached
Detach File
Event Timeline
Log In to Comment