Skip to content

Commit

Permalink
simplified repro
Browse files Browse the repository at this point in the history
  • Loading branch information
alduzy committed Oct 9, 2024
1 parent e58816f commit e75c4f0
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions apps/src/tests/Test2395.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import * as React from 'react';
import {
FlatList,
Image,
Pressable,
StyleSheet,
Text,
View,
ViewProps,
} from 'react-native';
import { FlatList, Pressable, StyleSheet, Text, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

Expand All @@ -27,7 +19,7 @@ export default function App() {
style={{
backgroundColor: 'lightblue',
padding: 3,
height: 100,
height: 200,
}}>
<Text>Right</Text>
</View>
Expand All @@ -48,15 +40,6 @@ export default function App() {
);
}

function Item({ children, ...props }: ViewProps) {
return (
<View style={styles.item} {...props}>
<Image source={require('../assets/trees.jpg')} style={styles.image} />
<Text style={styles.text}>{children}</Text>
</View>
);
}

function Screen() {
return (
<FlatList
Expand All @@ -66,7 +49,7 @@ function Screen() {
<Pressable
key={index}
style={({ pressed }) => (pressed ? styles.pressed : undefined)}>
<Item>List item {index + 1}</Item>
<Text style={styles.text}>List item {index + 1}</Text>
</Pressable>
)}
/>
Expand All @@ -78,19 +61,10 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: 'mediumseagreen',
},
item: {
flexDirection: 'row',
alignItems: 'center',
padding: 10,
gap: 10,
},
text: {
fontSize: 24,
color: 'black',
},
image: {
width: 50,
height: 50,
padding: 10,
},
pressed: {
backgroundColor: 'seagreen',
Expand Down

0 comments on commit e75c4f0

Please sign in to comment.