feat: new expense navigation
This commit is contained in:
parent
0c07dcc714
commit
9ec5755f96
10 changed files with 68 additions and 24 deletions
55
app/(tabs)/_layout.tsx
Normal file
55
app/(tabs)/_layout.tsx
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import { Tabs } from "expo-router/tabs";
|
||||
import {StyleSheet, View} from "react-native"
|
||||
|
||||
import { FontAwesome } from "@expo/vector-icons";
|
||||
import {useThemeColor} from "../../hooks/hooks";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout() {
|
||||
// const selectedColor: string = useThemeColor( "tabIconSelected");
|
||||
// const defaultColor: string = useThemeColor("tabIconDefault");
|
||||
// const backgroundColor: string = useThemeColor("backgroundColor");
|
||||
// const tabBarColor: string = useThemeColor("tabBarColor");
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sceneContainer: {
|
||||
backgroundColor: useThemeColor("backgroundColor"),
|
||||
},
|
||||
tabBar: {
|
||||
backgroundColor: useThemeColor("backgroundColor"),
|
||||
}
|
||||
});
|
||||
|
||||
const screenOptions = {
|
||||
tabBarActiveTintColor: useThemeColor( "tabIconSelected"),
|
||||
tabBarInactiveTintColor: useThemeColor("tabIconDefault"),
|
||||
headerShown: false,
|
||||
tabBarStyle: styles.tabBar,
|
||||
}
|
||||
|
||||
return (
|
||||
<Tabs sceneContainerStyle={styles.sceneContainer} screenOptions={screenOptions}>
|
||||
<Tabs.Screen name="budget/index" options={
|
||||
{
|
||||
tabBarLabel: "Budget",
|
||||
tabBarIcon: ({size, color}) => (
|
||||
<FontAwesome name="money" size={size} color={color}/>),
|
||||
}
|
||||
}/>
|
||||
<Tabs.Screen name="home" options={
|
||||
{
|
||||
tabBarLabel: "Home",
|
||||
tabBarIcon: ({size, color}) => (
|
||||
<FontAwesome name="home" size={size} color={color}/>),
|
||||
}
|
||||
}/>
|
||||
<Tabs.Screen name="stats/index" options={
|
||||
{
|
||||
tabBarLabel: "Stats",
|
||||
tabBarIcon: ({size, color}) => (
|
||||
<FontAwesome name="bar-chart" size={size} color={color}/>),
|
||||
}
|
||||
}/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
Reference in a new issue