change js/tsx to jsx
This commit is contained in:
33
app/(tabs)/_layout.jsx
Normal file
33
app/(tabs)/_layout.jsx
Normal file
@@ -0,0 +1,33 @@
|
||||
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();
|
||||
|
||||
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,
|
||||
tabBarItemStyle: { flex: 1 },
|
||||
}}>
|
||||
|
||||
<Tabs.Screen name="index" options={{ title: 'Home',tabBarIcon: ({ color, focused }) => (
|
||||
<Ionicons name={focused ? 'home-sharp' : 'home-outline'} color={color} size={24} />
|
||||
), }} />
|
||||
<Tabs.Screen name="add" options={{title: 'Create' ,tabBarIcon: ({ color, focused }) => (
|
||||
<Ionicons name={focused ? 'add-circle-sharp' : 'add-circle-outline'} color={color} size={24} />
|
||||
),}} />
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user