📅  最后修改于: 2022-03-11 15:04:23.804000             🧑  作者: Mango
import * as React from 'react';
import {
View,
Text,
StyleSheet,
useWindowDimensions,
Button,
} from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { Feather } from '@expo/vector-icons';
import { createStackNavigator } from '@react-navigation/stack';
import {
createDrawerNavigator,
DrawerContentScrollView,
DrawerItemList,
DrawerItem,
} from '@react-navigation/drawer';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
const Drawer = createDrawerNavigator();
const Tab = createBottomTabNavigator();
const Stack = createStackNavigator();
function TabNav() {
return (
(
TabOne
)}
/>
(
TabTwo
)}
/>
);
}
const StackNav = () => {
return (
);
};
function CustomDrawerContent(props) {
const width = useWindowDimensions().width * 0.3;
return (
<>
{
props.navigation.navigate('Screen1');
}}
/>
>
{
props.navigation.navigate('Screen1');
}}
/>
{
props.navigation.navigate('StackNav');
}}
/>
);
}
function MyDrawer() {
return (
}>
);
}
export default function App() {
return (
);
}
function Feed({ navigation }) {
return (
Feed Screen
);
}
function Article({ navigation }) {
return (
Article Screen
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
menuContainer: {
flex: 1,
flexDirection: 'row',
justifyContent: 'space-evenly',
},
menuItemsCard: {
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
borderRadius: 10,
},
circleContainer: {
width: 50,
height: 50,
borderRadius: 25,
padding: 10,
},
});