Skip to content

Commit 0bd4589

Browse files
author
Karen
committed
Merge branch 'develop'
2 parents ea008c2 + edfde70 commit 0bd4589

File tree

5 files changed

+80
-60
lines changed

5 files changed

+80
-60
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,6 @@ export default function HomeScreen() {
8787
description: 'Lorem ipsum dolor sit amet',
8888
}));
8989
const title = 'Animated Title';
90-
const backgroundImageUrl =
91-
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809';
92-
const avatarUrl = 'https://api.dicebear.com/7.x/avataaars/png?seed=John';
93-
94-
const HeaderBackground = () => (
95-
<ImageBackground
96-
source={{ uri: backgroundImageUrl }}
97-
style={styles.headerBackground}
98-
/>
99-
);
100-
101-
const HeaderContent = () => (
102-
<View style={styles.headerContent}>
103-
<Image source={{ uri: avatarUrl }} style={styles.avatar} />
104-
</View>
105-
);
106-
107-
const StickyComponent = () => (
108-
<Text style={styles.stickyComponent}>Sticky Item</Text>
109-
);
11090

11191
const renderItem = ({
11292
item,
@@ -134,6 +114,32 @@ export default function HomeScreen() {
134114
);
135115
}
136116

117+
const HeaderBackground = () => {
118+
const backgroundImageUrl =
119+
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809';
120+
121+
return (
122+
<ImageBackground
123+
source={{ uri: backgroundImageUrl }}
124+
style={styles.headerBackground}
125+
/>
126+
);
127+
};
128+
129+
const HeaderContent = () => {
130+
const avatarUrl = 'https://api.dicebear.com/7.x/avataaars/png?seed=John';
131+
132+
return (
133+
<View style={styles.headerContent}>
134+
<Image source={{ uri: avatarUrl }} style={styles.avatar} />
135+
</View>
136+
);
137+
};
138+
139+
const StickyComponent = () => (
140+
<Text style={styles.stickyComponent}>Sticky Item</Text>
141+
);
142+
137143
const styles = StyleSheet.create({
138144
headerBackground: {
139145
backgroundColor: 'white',

README_zh.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,6 @@ export default function HomeScreen() {
8787
description: 'Lorem ipsum dolor sit amet',
8888
}));
8989
const title = 'Animated Title';
90-
const backgroundImageUrl =
91-
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809';
92-
const avatarUrl = 'https://api.dicebear.com/7.x/avataaars/png?seed=John';
93-
94-
const HeaderBackground = () => (
95-
<ImageBackground
96-
source={{ uri: backgroundImageUrl }}
97-
style={styles.headerBackground}
98-
/>
99-
);
100-
101-
const HeaderContent = () => (
102-
<View style={styles.headerContent}>
103-
<Image source={{ uri: avatarUrl }} style={styles.avatar} />
104-
</View>
105-
);
106-
107-
const StickyComponent = () => (
108-
<Text style={styles.stickyComponent}>Sticky Item</Text>
109-
);
11090

11191
const renderItem = ({
11292
item,
@@ -134,6 +114,32 @@ export default function HomeScreen() {
134114
);
135115
}
136116

117+
const HeaderBackground = () => {
118+
const backgroundImageUrl =
119+
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809';
120+
121+
return (
122+
<ImageBackground
123+
source={{ uri: backgroundImageUrl }}
124+
style={styles.headerBackground}
125+
/>
126+
);
127+
};
128+
129+
const HeaderContent = () => {
130+
const avatarUrl = 'https://api.dicebear.com/7.x/avataaars/png?seed=John';
131+
132+
return (
133+
<View style={styles.headerContent}>
134+
<Image source={{ uri: avatarUrl }} style={styles.avatar} />
135+
</View>
136+
);
137+
};
138+
139+
const StickyComponent = () => (
140+
<Text style={styles.stickyComponent}>Sticky Item</Text>
141+
);
142+
137143
const styles = StyleSheet.create({
138144
headerBackground: {
139145
backgroundColor: 'white',

example/babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
12
const path = require('path');
23
const { getConfig } = require('react-native-builder-bob/babel-config');
34
const pkg = require('../package.json');

example/metro.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
12
const path = require('path');
23
const { getDefaultConfig } = require('@expo/metro-config');
34
const { getConfig } = require('react-native-builder-bob/metro-config');

example/src/HomeScreen.tsx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,6 @@ export default function HomeScreen() {
1010
description: 'Lorem ipsum dolor sit amet',
1111
}));
1212
const title = 'Animated Title';
13-
const backgroundImageUrl =
14-
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809';
15-
const avatarUrl = 'https://api.dicebear.com/7.x/avataaars/png?seed=John';
16-
17-
const HeaderBackground = () => (
18-
<ImageBackground
19-
source={{ uri: backgroundImageUrl }}
20-
style={styles.headerBackground}
21-
/>
22-
);
23-
24-
const HeaderContent = () => (
25-
<View style={styles.headerContent}>
26-
<Image source={{ uri: avatarUrl }} style={styles.avatar} />
27-
</View>
28-
);
29-
30-
const StickyComponent = () => (
31-
<Text style={styles.stickyComponent}>Sticky Item</Text>
32-
);
3313

3414
const renderItem = ({
3515
item,
@@ -57,6 +37,32 @@ export default function HomeScreen() {
5737
);
5838
}
5939

40+
const HeaderBackground = () => {
41+
const backgroundImageUrl =
42+
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809';
43+
44+
return (
45+
<ImageBackground
46+
source={{ uri: backgroundImageUrl }}
47+
style={styles.headerBackground}
48+
/>
49+
);
50+
};
51+
52+
const HeaderContent = () => {
53+
const avatarUrl = 'https://api.dicebear.com/7.x/avataaars/png?seed=John';
54+
55+
return (
56+
<View style={styles.headerContent}>
57+
<Image source={{ uri: avatarUrl }} style={styles.avatar} />
58+
</View>
59+
);
60+
};
61+
62+
const StickyComponent = () => (
63+
<Text style={styles.stickyComponent}>Sticky Item</Text>
64+
);
65+
6066
const styles = StyleSheet.create({
6167
headerBackground: {
6268
backgroundColor: 'white',

0 commit comments

Comments
 (0)