Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Feb 29, 2024
1 parent 777ddd8 commit 447752b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export type EdgeInsetsValue = {
bottom: number,
};

export type CursorValue = ?('auto' | 'pointer');

export type DimensionValue = number | string | 'auto' | AnimatedNode | null;
export type AnimatableNumericValue = number | AnimatedNode;

export type CursorValue = 'auto' | 'pointer';

/**
* React Native's layout system is based on Flexbox and is powered both
* on iOS and Android by an open source project called `Yoga`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ @implementation RCTViewComponentView {
BOOL _needsInvalidateLayer;
BOOL _isJSResponder;
BOOL _removeClippedSubviews;
Cursor _cursor;
NSMutableArray<UIView *> *_reactSubviews;
NSSet<NSString *> *_Nullable _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN;
}
Expand All @@ -50,7 +49,6 @@ - (instancetype)initWithFrame:(CGRect)frame
_props = ViewShadowNode::defaultSharedProps();
_reactSubviews = [NSMutableArray new];
self.multipleTouchEnabled = YES;
_cursor = Cursor::Auto;
}
return self;
}
Expand Down Expand Up @@ -261,7 +259,6 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &

// `cursor`
if (oldViewProps.cursor != newViewProps.cursor) {
_cursor = newViewProps.cursor;
needsInvalidateLayer = YES;
}

Expand Down Expand Up @@ -603,7 +600,7 @@ - (void)invalidateLayer
// Stage 1.5. Cursor / Hover Effects
if (@available(iOS 17.0, *)) {
UIHoverStyle *hoverStyle = nil;
if (_cursor == Cursor::Pointer) {
if (_props->cursor == Cursor::Pointer) {
const RCTCornerInsets cornerInsets =
RCTGetCornerInsets(RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii), UIEdgeInsetsZero);
#if TARGET_OS_IOS
Expand Down

0 comments on commit 447752b

Please sign in to comment.