Skip to content

Commit 23b21c7

Browse files
committed
Merge branch 'features/example' into develop
2 parents f61e055 + 766b3e1 commit 23b21c7

File tree

101 files changed

+706
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+706
-224
lines changed

README.md

Lines changed: 82 additions & 11 deletions

example/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@
1212
"test": "jest"
1313
},
1414
"dependencies": {
15+
"@react-native-community/masked-view": "0.1.10",
16+
"@react-navigation/bottom-tabs": "^5.11.11",
17+
"@react-navigation/native": "^5.9.4",
18+
"@react-navigation/stack": "^5.14.5",
1519
"expo": "^40.0.0",
1620
"expo-splash-screen": "~0.8.1",
21+
"expo-status-bar": "~1.0.3",
1722
"react": "16.13.1",
1823
"react-dom": "16.13.1",
1924
"react-native": "0.63.4",
20-
"react-native-reanimated": "2.0.0-rc.0",
25+
"react-native-gesture-handler": "~1.8.0",
26+
"react-native-reanimated": "~1.13.0",
2127
"react-native-redash": "^16.0.11",
28+
"react-native-safe-area-context": "3.1.9",
29+
"react-native-screens": "~2.15.2",
2230
"react-native-svg": "^12.1.1",
2331
"react-native-unimodules": "~0.12.0",
2432
"react-native-web": "~0.14.9"

example/src/App.tsx

Lines changed: 13 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,16 @@
1-
import * as React from 'react';
2-
import { StyleSheet, View, Text, SafeAreaView, Image } from 'react-native';
3-
import { assets } from './assets';
4-
import { CollapsedView } from 'react-native-accordion';
5-
import { useCallback } from 'react';
1+
import { StatusBar } from 'expo-status-bar';
2+
import React from 'react';
3+
import { SafeAreaProvider } from 'react-native-safe-area-context';
4+
import { BottomBarNavigator } from './navigation';
5+
import { NavigationContainer } from '@react-navigation/native';
66

7-
const menu = [
8-
{
9-
title: 'UI/UX Creative',
10-
description: 'The hacking UI podcast',
11-
image: assets.people_1,
12-
time: '2 MINS AGO',
13-
},
14-
{
15-
title: 'Joni Ernest',
16-
description: 'The wicked wall flowers club',
17-
image: assets.people_2,
18-
time: '15 MINS AGO',
19-
},
20-
{
21-
title: 'Emilie Lose ',
22-
description: 'Icon design learning',
23-
image: assets.people_3,
24-
time: '45 MINS AGO',
25-
},
26-
];
27-
28-
const App = () => {
29-
const handleContentTouchable = useCallback(
30-
() => (
31-
<View style={styles.row}>
32-
<View style={styles.shape}>
33-
<Image
34-
source={assets.notification}
35-
resizeMode={'contain'}
36-
style={styles.icon}
37-
/>
38-
</View>
39-
<Text style={styles.title}>Notifications</Text>
40-
</View>
41-
),
42-
[]
43-
);
44-
45-
const handleContent = useCallback(
46-
() =>
47-
menu.map(({ title, description, image }) => (
48-
<View style={styles.contentItem}>
49-
<Image source={image} resizeMode={'contain'} style={styles.avatar} />
50-
<View style={{ flex: 1 }}>
51-
<View style={styles.row}>
52-
<Text style={styles.name}>{title}</Text>
53-
<Text style={styles.notification}>2 MINS AGO</Text>
54-
</View>
55-
<View style={styles.item}>
56-
<Text style={styles.description}>{description}</Text>
57-
<View style={styles.circle}>
58-
<Text style={styles.notification}>2</Text>
59-
</View>
60-
</View>
61-
</View>
62-
</View>
63-
)),
64-
[]
65-
);
7+
export default function App() {
668
return (
67-
<SafeAreaView style={styles.container}>
68-
<CollapsedView
69-
onChangeState={(value: boolean) => console.log(value)}
70-
handleContentTouchable={handleContentTouchable}
71-
renderContent={handleContent}
72-
styleTouchable={styles.touchable}
73-
styleContainer={styles.content}
74-
/>
75-
<CollapsedView
76-
onChangeState={(value: boolean) => console.log(value)}
77-
handleContentTouchable={handleContentTouchable}
78-
renderContent={handleContent}
79-
styleTouchable={styles.touchable}
80-
styleContainer={styles.content}
81-
/>
82-
</SafeAreaView>
9+
<SafeAreaProvider>
10+
<NavigationContainer>
11+
<BottomBarNavigator />
12+
</NavigationContainer>
13+
<StatusBar />
14+
</SafeAreaProvider>
8315
);
84-
};
85-
export default App;
86-
87-
const styles = StyleSheet.create({
88-
container: {
89-
flex: 1,
90-
},
91-
content: {
92-
paddingHorizontal: 12,
93-
},
94-
touchable: {
95-
backgroundColor: 'white',
96-
},
97-
row: {
98-
flexDirection: 'row',
99-
justifyContent: 'flex-start',
100-
alignItems: 'center',
101-
},
102-
contentItem: {
103-
flexDirection: 'row',
104-
backgroundColor: 'red',
105-
},
106-
107-
item: {
108-
flexDirection: 'row',
109-
justifyContent: 'space-between',
110-
alignItems: 'center',
111-
},
112-
shape: {
113-
height: 34,
114-
width: 34,
115-
borderRadius: 8,
116-
justifyContent: 'center',
117-
alignItems: 'center',
118-
backgroundColor: '#e5f6ff',
119-
},
120-
121-
circle: {
122-
height: 24,
123-
width: 24,
124-
borderRadius: 24 / 2,
125-
justifyContent: 'center',
126-
alignItems: 'center',
127-
backgroundColor: '#2276fe',
128-
},
129-
notification: {
130-
color: 'white',
131-
},
132-
icon: {
133-
tintColor: '#00a1ed',
134-
height: 18,
135-
width: 18,
136-
},
137-
avatar: {
138-
height: 36,
139-
width: 36,
140-
borderRadius: 36 / 2,
141-
},
142-
title: {
143-
marginStart: 12,
144-
fontSize: 20,
145-
color: '#0b0e25',
146-
},
147-
name: {
148-
fontSize: 14,
149-
color: '#0b0e25',
150-
},
151-
description: {
152-
fontSize: 14,
153-
color: '#6da4ff',
154-
},
155-
});
16+
}
1.41 KB
4.32 KB
8.72 KB
1.62 KB
4.73 KB
9.2 KB
1.69 KB

0 commit comments

Comments
 (0)