mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-06 03:45:18 +00:00
committed by
Nicolas Gallagher
parent
89be8a9f8b
commit
63c39454de
+1
-1
@@ -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=""
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user