Skip to content

Commit 681695f

Browse files
committed
chore: Examples images problem.
1 parent b494ade commit 681695f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

exampleExpo/src/components/SBImageItem.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
ViewStyle,
88
Image,
99
ImageURISource,
10+
Text,
1011
} from 'react-native';
1112

1213
interface Props {
@@ -24,6 +25,20 @@ export const SBImageItem: React.FC<Props> = ({ style, index: _index }) => {
2425
<View style={[styles.container, style]}>
2526
<ActivityIndicator size="small" />
2627
<Image key={index} style={styles.image} source={source} />
28+
<Text
29+
style={{
30+
position: 'absolute',
31+
color: 'white',
32+
fontSize: 40,
33+
backgroundColor: '#333333',
34+
borderRadius: 5,
35+
overflow: 'hidden',
36+
paddingHorizontal: 10,
37+
paddingTop: 2,
38+
}}
39+
>
40+
{index}
41+
</Text>
2742
</View>
2843
);
2944
};

exampleExpo/src/components/SBItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const SBItem: React.FC<Props> = (props) => {
2626
>
2727
<Animated.View style={{ flex: 1 }} {...animatedViewProps}>
2828
{isPretty ? (
29-
<SBImageItem style={style} />
29+
<SBImageItem style={style} index={index} />
3030
) : (
3131
<SBTextItem style={style} index={index} />
3232
)}

0 commit comments

Comments
 (0)