Skip to content

Commit 9efc211

Browse files
committed
Add placeholders with NNativeBase
1 parent e238508 commit 9efc211

File tree

6 files changed

+1030
-42
lines changed

6 files changed

+1030
-42
lines changed

App.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { StatusBar } from 'expo-status-bar';
2+
import { NativeBaseProvider } from 'native-base';
23
import { SafeAreaProvider } from 'react-native-safe-area-context';
34

45
import useCachedResources from './hooks/useCachedResources';
@@ -14,8 +15,10 @@ export default function App() {
1415
} else {
1516
return (
1617
<SafeAreaProvider>
17-
<Navigation colorScheme={colorScheme} />
18-
<StatusBar />
18+
<NativeBaseProvider>
19+
<Navigation colorScheme={colorScheme} />
20+
<StatusBar />
21+
</NativeBaseProvider>
1922
</SafeAreaProvider>
2023
);
2124
}

navigation/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ function BottomTabNavigator() {
6666
name="TabOne"
6767
component={TabOneScreen}
6868
options={({ navigation }: RootTabScreenProps<'TabOne'>) => ({
69-
title: 'Tab One',
70-
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
69+
title: 'Home',
70+
tabBarIcon: ({ color }) => <TabBarIcon name="home" color={color} />,
7171
headerRight: () => (
7272
<Pressable
7373
onPress={() => navigation.navigate('Modal')}
@@ -88,8 +88,8 @@ function BottomTabNavigator() {
8888
name="TabTwo"
8989
component={TabTwoScreen}
9090
options={{
91-
title: 'Tab Two',
92-
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
91+
title: 'Appointments',
92+
tabBarIcon: ({ color }) => <TabBarIcon name="calendar" color={color} />,
9393
}}
9494
/>
9595
</BottomTab.Navigator>

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
"expo-status-bar": "~1.3.0",
2828
"expo-system-ui": "~1.2.0",
2929
"expo-web-browser": "~10.2.0",
30+
"native-base": "^3.4.5",
3031
"react": "17.0.2",
3132
"react-dom": "17.0.2",
3233
"react-native": "0.68.2",
3334
"react-native-safe-area-context": "4.2.4",
3435
"react-native-screens": "~3.11.1",
36+
"react-native-svg": "12.3.0",
3537
"react-native-web": "0.17.7"
3638
},
3739
"devDependencies": {

screens/TabOneScreen.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
import { FontAwesome } from '@expo/vector-icons';
2+
import { Box, Button } from 'native-base';
13
import { StyleSheet } from 'react-native';
24

3-
import EditScreenInfo from '../components/EditScreenInfo';
4-
import { Text, View } from '../components/Themed';
55
import { RootTabScreenProps } from '../types';
66

77
export default function TabOneScreen({ navigation }: RootTabScreenProps<'TabOne'>) {
88
return (
9-
<View style={styles.container}>
10-
<Text style={styles.title}>Tab One</Text>
11-
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
12-
<EditScreenInfo path="/screens/TabOneScreen.tsx" />
13-
</View>
14-
);
9+
<Box padding={10}>
10+
11+
<Button leftIcon={<FontAwesome name='calendar' />}>
12+
Book an appointment
13+
</Button>
14+
</Box>
15+
)
1516
}
1617

1718
const styles = StyleSheet.create({

screens/TabTwoScreen.tsx

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
1-
import { StyleSheet } from 'react-native';
2-
3-
import EditScreenInfo from '../components/EditScreenInfo';
4-
import { Text, View } from '../components/Themed';
1+
import { Box } from 'native-base';
52

63
export default function TabTwoScreen() {
74
return (
8-
<View style={styles.container}>
9-
<Text style={styles.title}>Tab Two</Text>
10-
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
11-
<EditScreenInfo path="/screens/TabTwoScreen.tsx" />
12-
</View>
5+
<Box padding={10}>
6+
List of appointments goes here
7+
</Box>
138
);
149
}
15-
16-
const styles = StyleSheet.create({
17-
container: {
18-
flex: 1,
19-
alignItems: 'center',
20-
justifyContent: 'center',
21-
},
22-
title: {
23-
fontSize: 20,
24-
fontWeight: 'bold',
25-
},
26-
separator: {
27-
marginVertical: 30,
28-
height: 1,
29-
width: '80%',
30-
},
31-
});

0 commit comments

Comments
 (0)