Skip to content

Commit 63c3945

Browse files
burakgormeknecolas
authored andcommitted
[fix] Pressable disabled cursor state
Close #1782
1 parent 89be8a9 commit 63c3945

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/react-native-web/src/exports/Pressable/__tests__/__snapshots__/index-test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ exports[`components/Pressable prop "accessibilityRole" value is set 1`] = `
146146
exports[`components/Pressable prop "disabled" 1`] = `
147147
<div
148148
aria-disabled="true"
149-
class="css-view-1dbjc4n r-cursor-1loqt21 r-touchAction-1otgn73"
149+
class="css-view-1dbjc4n"
150150
disabled=""
151151
/>
152152
`;

packages/react-native-web/src/exports/Pressable/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ function Pressable(props: Props, forwardedRef): React.Node {
158158
onBlur={createFocusHandler(onBlur, false)}
159159
onFocus={createFocusHandler(onFocus, true)}
160160
ref={setRef}
161-
style={[styles.root, typeof style === 'function' ? style(interactionState) : style]}
161+
style={[
162+
!disabled && styles.root,
163+
typeof style === 'function' ? style(interactionState) : style
164+
]}
162165
>
163166
{typeof children === 'function' ? children(interactionState) : children}
164167
</View>

0 commit comments

Comments
 (0)