Skip to content

Commit 344ef56

Browse files
authored
fix: set cursor to auto when touchable is disabled (#4701)
1 parent 0889b0b commit 344ef56

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/TouchableRipple/TouchableRipple.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ const TouchableRipple = (
282282
// focused state is not ready yet: https://github.com/necolas/react-native-web/issues/1849
283283
// state.focused && { backgroundColor: ___ },
284284
state.hovered && { backgroundColor: hoverColor },
285+
disabled && styles.disabled,
285286
typeof style === 'function' ? style(state) : style,
286287
]}
287288
>
@@ -307,6 +308,11 @@ const styles = StyleSheet.create({
307308
transition: '150ms background-color',
308309
}),
309310
},
311+
disabled: {
312+
...(Platform.OS === 'web' && {
313+
cursor: 'auto',
314+
}),
315+
},
310316
borderless: {
311317
overflow: 'hidden',
312318
},

0 commit comments

Comments
 (0)