import React from 'react';
import { StyleSheet, TouchableNativeFeedback, useColorScheme, View } from 'react-native'
import { NavigationContainer } from '@react-navigation/native';
import { BottomTabBarButtonProps, BottomTabNavigationOptions, createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { List as ListIcon } from "react-native-feather";
import { Edit2 as PlaygroundIcon } from "react-native-feather";
import { BookOpen as LearnIcon } from "react-native-feather";
import Learn from '../pages/Learn';
import Playground from '../pages/Playground';
import KanjiStackNavigator from './Stack';
const LearnButton = (props: BottomTabBarButtonProps) => {
const learnButtonStyle = useColorScheme() == 'light' ? learnButtonStyle_light : learnButtonStyle_dark;
return (
{props.children}
)
}
const learnButtonStyle_light = StyleSheet.create({
button: {
backgroundColor: "#FF5C5C",
width: 80,
height: 80,
borderRadius: 40,
},
button2: {
backgroundColor: "#f5f5f4",
width: 90,
height: 90,
borderRadius: 45,
position: "absolute"
},
});
const learnButtonStyle_dark = StyleSheet.create({
button: {
backgroundColor: "#FF5C5C",
width: 80,
height: 80,
borderRadius: 40,
},
button2: {
backgroundColor: "#2b2b2b",
width: 90,
height: 90,
borderRadius: 45,
position: "absolute"
},
});
const TabBar = () => {
const Tab = createBottomTabNavigator();
return (
(
)
}}
name="List"
component={KanjiStackNavigator}
/>
(
),
tabBarButton: (props) => (
)
}}
name="Learn"
component={Learn} />
(
)
}}
name="Playground"
component={Playground} />
);
}
const tabOptions: BottomTabNavigationOptions = {
tabBarShowLabel: false,
headerShown: false,
tabBarStyle: {
backgroundColor: "#FF5C5C",
},
tabBarActiveTintColor: "white",
tabBarInactiveTintColor: "black",
};
export default TabBar;