react-native-ui-lib 7.37.2-snapshot.6204 → 7.37.2-snapshot.6208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
58
58
|
onPress,
|
|
59
59
|
children
|
|
60
60
|
} = themeProps;
|
|
61
|
+
const hitTargetPadding = Math.max(0, (48 - size) / 2);
|
|
61
62
|
const {
|
|
62
63
|
size: _badgeSize,
|
|
63
64
|
borderWidth: badgeBorderWidth = 0
|
|
@@ -174,7 +175,7 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
174
175
|
}
|
|
175
176
|
};
|
|
176
177
|
const Container = onPress ? TouchableOpacity : View;
|
|
177
|
-
return <Container style={_containerStyle} ref={ref} testID={testID} onPress={onPress} accessible={!_isUndefined(onPress)} accessibilityLabel={'Avatar'} accessibilityRole={onPress ? 'button' : 'image'} {...accessibilityProps}>
|
|
178
|
+
return <Container style={_containerStyle} ref={ref} testID={testID} onPress={onPress} accessible={!_isUndefined(onPress)} accessibilityLabel={'Avatar'} accessibilityRole={onPress ? 'button' : 'image'} hitSlop={onPress ? hitTargetPadding : undefined} {...accessibilityProps}>
|
|
178
179
|
<View testID={`${testID}.container`} style={textContainerStyle}>
|
|
179
180
|
{!_isUndefined(text) && <Text numberOfLines={1} style={textStyle} testID={`${testID}.label`}>
|
|
180
181
|
{text}
|