import * as React from 'react';
import { Button, View } from 'react-native';
import { withNavigation } from 'react-navigation';
import {
createDrawerNavigator,
DrawerGestureContext,
NavigationDrawerProp,
} from 'react-navigation-drawer';
import MapView from 'react-native-maps';
import { WebView } from 'react-native-webview';
import { NativeViewGestureHandler } from 'react-native-gesture-handler';
const ContainerWithButtons = withNavigation(
({
children,
navigation,
}: {
children: React.ReactNode;
navigation: NavigationDrawerProp;
}) => (
{children}
)
);
const MapScreen = () => (
{(ref) => (
)}
);
MapScreen.navigationOptions = {
title: 'MapView',
};
const WebViewScreen = () => (
{(ref) => (
)}
);
WebViewScreen.navigationOptions = {
title: 'WebView',
};
const DrawerExample = createDrawerNavigator(
{
Map: MapScreen,
Web: WebViewScreen,
},
{
edgeWidth: 70,
minSwipeDistance: 3,
contentOptions: {
activeTintColor: '#e91e63',
},
}
);
export default DrawerExample;