mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
fix: change way passing onPress prop (#2386)
This commit is contained in:
@@ -34,6 +34,7 @@ export const prepare = <T extends BaseProps>(
|
||||
forwardedRef,
|
||||
gradientTransform,
|
||||
patternTransform,
|
||||
onPress,
|
||||
...rest
|
||||
} = props;
|
||||
|
||||
@@ -117,7 +118,7 @@ export const prepare = <T extends BaseProps>(
|
||||
styles.fontStyle = fontStyle;
|
||||
}
|
||||
clean.style = resolve(style, styles);
|
||||
if (props.onPress != null) {
|
||||
if (onPress !== null) {
|
||||
clean.onClick = props.onPress;
|
||||
}
|
||||
if (props.href !== null) {
|
||||
|
||||
Reference in New Issue
Block a user