Files
react-native-svg/apps/common/test/Test2407.tsx
Jakub Grzywacz b3b175a7fb feat: move examples to ./apps (#2507)
# Summary

Due to the large number of example apps in the repository, I decided to
change the structure and move all applications into an "apps" folder to
maintain a clear structure.
2024-10-25 16:12:23 +02:00

35 lines
763 B
TypeScript

import React from 'react';
import {SafeAreaView, StyleSheet} from 'react-native';
import Svg, {Rect} from 'react-native-svg';
export default () => {
return (
<SafeAreaView style={styles.container}>
<Svg
width={200}
height={200}
viewBox="0 0 200 200"
hitSlop={50}
// hitSlop={{top: 50, left: 50, right: 50, bottom: 50}}
onPress={() => console.log('press')}>
<Rect
width={200}
height={200}
x={0}
y={0}
fill="red"
onPress={() => console.log('rect press')}
/>
</Svg>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});