parent
2ba5602b27
commit
8e145cc62e
@ -1,45 +1,42 @@ |
|||||||
import { Tabs } from "expo-router"; |
import { Tabs } from "expo-router"; |
||||||
import { MaterialIcons } from "@expo/vector-icons"; |
import { MaterialIcons } from "@expo/vector-icons"; |
||||||
import { TodosProvider } from "@/store/todoProvider"; |
|
||||||
|
|
||||||
export default function TabLayout() { |
export default function TabLayout() { |
||||||
return ( |
return ( |
||||||
<TodosProvider> |
<Tabs |
||||||
<Tabs |
screenOptions={{ |
||||||
screenOptions={{ |
headerShown: false, |
||||||
headerShown: false, |
tabBarStyle: { height: 56 }, |
||||||
tabBarStyle: { height: 56 }, |
tabBarLabelStyle: { fontSize: 12 }, |
||||||
tabBarLabelStyle: { fontSize: 12 }, |
tabBarHideOnKeyboard: false, |
||||||
tabBarHideOnKeyboard: true, |
}} |
||||||
|
> |
||||||
|
<Tabs.Screen |
||||||
|
name="index" |
||||||
|
options={{ |
||||||
|
title: "할 일", |
||||||
|
tabBarIcon: ({ color, focused, size }) => ( |
||||||
|
<MaterialIcons |
||||||
|
name={focused ? "check-box" : "check-box-outline-blank"} |
||||||
|
size={size ?? 24} |
||||||
|
color={color} |
||||||
|
/> |
||||||
|
), |
||||||
}} |
}} |
||||||
> |
/> |
||||||
<Tabs.Screen |
<Tabs.Screen |
||||||
name="index" |
name="done" |
||||||
options={{ |
options={{ |
||||||
title: "할 일", |
title: "완료됨", |
||||||
tabBarIcon: ({ color, focused, size }) => ( |
tabBarIcon: ({ color, focused, size }) => ( |
||||||
<MaterialIcons |
<MaterialIcons |
||||||
name={focused ? "check-box" : "check-box-outline-blank"} |
name={focused ? "done-all" : "done"} |
||||||
size={size ?? 24} |
size={size ?? 24} |
||||||
color={color} |
color={color} |
||||||
/> |
/> |
||||||
), |
), |
||||||
}} |
}} |
||||||
/> |
/> |
||||||
<Tabs.Screen |
</Tabs> |
||||||
name="done" |
|
||||||
options={{ |
|
||||||
title: "완료됨", |
|
||||||
tabBarIcon: ({ color, focused, size }) => ( |
|
||||||
<MaterialIcons |
|
||||||
name={focused ? "done-all" : "done"} |
|
||||||
size={size ?? 24} |
|
||||||
color={color} |
|
||||||
/> |
|
||||||
), |
|
||||||
}} |
|
||||||
/> |
|
||||||
</Tabs> |
|
||||||
</TodosProvider> |
|
||||||
); |
); |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue