[fix] Pressable disabled cursor state

Close #1782
This commit is contained in:
burakgormek
2020-10-26 22:57:26 +03:00
committed by Nicolas Gallagher
parent 89be8a9f8b
commit 63c39454de
2 changed files with 5 additions and 2 deletions
@@ -146,7 +146,7 @@ exports[`components/Pressable prop "accessibilityRole" value is set 1`] = `
exports[`components/Pressable prop "disabled" 1`] = ` exports[`components/Pressable prop "disabled" 1`] = `
<div <div
aria-disabled="true" aria-disabled="true"
class="css-view-1dbjc4n r-cursor-1loqt21 r-touchAction-1otgn73" class="css-view-1dbjc4n"
disabled="" disabled=""
/> />
`; `;
+4 -1
View File
@@ -158,7 +158,10 @@ function Pressable(props: Props, forwardedRef): React.Node {
onBlur={createFocusHandler(onBlur, false)} onBlur={createFocusHandler(onBlur, false)}
onFocus={createFocusHandler(onFocus, true)} onFocus={createFocusHandler(onFocus, true)}
ref={setRef} ref={setRef}
style={[styles.root, typeof style === 'function' ? style(interactionState) : style]} style={[
!disabled && styles.root,
typeof style === 'function' ? style(interactionState) : style
]}
> >
{typeof children === 'function' ? children(interactionState) : children} {typeof children === 'function' ? children(interactionState) : children}
</View> </View>