-
Notifications
You must be signed in to change notification settings - Fork 734
Typescript/feature highlight #1338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
*/ | ||
pageControlProps: PropTypes.shape(PageControl.propTypes) | ||
}; | ||
static propTypes = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you leave the propTypes
static object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -298,7 +332,7 @@ class FeatureHighlight extends BaseComponent { | |||
titleStyle | |||
]} | |||
numberOfLines={titleNumberOfLines} | |||
pointerEvents="none" | |||
pointerEvents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the meaning of this change. pointerEvets
prop is not a boolean so why did you drop the value ("none")?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It becomes boolean from out modifiers, and some how react-native haven't export this prop with a type,
so I changed it back and added @ts-expect-error
@@ -219,8 +252,8 @@ class FeatureHighlight extends BaseComponent { | |||
} | |||
|
|||
getContentPosition() { | |||
const {highlightFrame, minimumRectSize, innerPadding} = this.props; | |||
const {top, height} = this.targetPosition; | |||
const {highlightFrame, minimumRectSize = {height: 0}, innerPadding = 0} = this.props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimumRectSize
is of type ReactSize
, is setting only the height as default enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since it's only used the height in line 262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know. I just thought it might give you a type error...
@mendyEdri Resolve conflicts and merge please. |
Description
Migrate
FeatureHighlight
component into typescript.Changelog
Migrate
FeatureHighlight
component into typescript.