Initial commit
This commit is contained in:
34
app/(tabs)/_layout.tsx
Normal file
34
app/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Tabs } from 'expo-router';
|
||||
import Ionicons from '@expo/vector-icons/Ionicons';
|
||||
import { useTheme } from 'react-native-paper';
|
||||
|
||||
|
||||
export default function TabLayout() {
|
||||
const theme = useTheme();
|
||||
console.log(theme.colors);
|
||||
return (
|
||||
<Tabs screenOptions ={{
|
||||
tabBarInactiveTintColor: theme.colors.primary,
|
||||
tabBarActiveTintColor:theme.colors.onPrimary,
|
||||
tabBarStyle: {
|
||||
backgroundColor: theme.colors.primaryContainer,
|
||||
borderTopWidth: 0,
|
||||
},
|
||||
headerStyle: {
|
||||
backgroundColor: theme.colors.primaryContainer,
|
||||
borderBottomWidth:0
|
||||
},
|
||||
headerTintColor: theme.colors.primary,
|
||||
}}>
|
||||
<Tabs.Screen name="index" options={{ title: 'Home',tabBarIcon: ({ color, focused }) => (
|
||||
<Ionicons name={focused ? 'home-sharp' : 'home-outline'} color={color} size={24} />
|
||||
), }} />
|
||||
<Tabs.Screen name="location" options={{ title: 'Location' ,tabBarIcon: ({ color, focused }) => (
|
||||
<Ionicons name={focused ? 'location-sharp' : 'location-outline'} color={color} size={24} />
|
||||
),}} />
|
||||
<Tabs.Screen name="formScreen" options={{title: 'Create/Edit' ,tabBarIcon: ({ color, focused }) => (
|
||||
<Ionicons name={focused ? 'add-circle-sharp' : 'add-circle-outline'} color={color} size={24} />
|
||||
),}} />
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
21
app/(tabs)/formScreen.tsx
Normal file
21
app/(tabs)/formScreen.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Text, View, StyleSheet } from 'react-native';
|
||||
|
||||
export default function FormScreen() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Form</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#25292e',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
text: {
|
||||
color: '#fff',
|
||||
},
|
||||
});
|
||||
23
app/(tabs)/index.tsx
Normal file
23
app/(tabs)/index.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Text, View, StyleSheet } from 'react-native';
|
||||
import { useTheme } from 'react-native-paper';
|
||||
|
||||
export default function Index() {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<View style={[styles.container, {backgroundColor: theme.colors.background}]}>
|
||||
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#25292e',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
text: {
|
||||
color: '#fff',
|
||||
},
|
||||
});
|
||||
21
app/(tabs)/location.tsx
Normal file
21
app/(tabs)/location.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Text, View, StyleSheet } from 'react-native';
|
||||
|
||||
export default function Location() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Location View</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#25292e',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
text: {
|
||||
color: '#fff',
|
||||
},
|
||||
});
|
||||
19
app/_layout.tsx
Normal file
19
app/_layout.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Stack } from 'expo-router';
|
||||
import { useColorScheme } from 'react-native';
|
||||
import { PaperProvider} from 'react-native-paper';
|
||||
import { MD3LightTheme, MD3DarkTheme } from 'react-native-paper';
|
||||
|
||||
const colorScheme = useColorScheme();
|
||||
const theme = colorScheme === 'dark' ? MD3DarkTheme :
|
||||
MD3LightTheme;
|
||||
|
||||
console.log(colorScheme)
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<PaperProvider theme={theme} >
|
||||
<Stack>
|
||||
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
</PaperProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user