-
-
Notifications
You must be signed in to change notification settings - Fork 937
Expand file tree
/
Copy pathMapInModal.tsx
More file actions
22 lines (20 loc) · 818 Bytes
/
MapInModal.tsx
File metadata and controls
22 lines (20 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import { Button, Text } from 'react-native';
import { MapView } from '@rnmapbox/maps';
import { SafeAreaView } from 'react-native-safe-area-context';
import { type NativeStackNavigationProp } from '@react-navigation/native-stack';
import { type ParamListBase } from '@react-navigation/native';
type MapInModalProps = {
navigation?: NativeStackNavigationProp<ParamListBase, string, undefined>;
dismiss?: () => void;
};
const MapInModal: React.FC<MapInModalProps> = ({ navigation, dismiss }) => (
<SafeAreaView style={{ flex: 1 }}>
<Text style={{ paddingHorizontal: 20, textAlign: 'center' }}>
this is a modal
</Text>
<Button title="close" onPress={navigation?.goBack ?? dismiss} />
<MapView style={{ flex: 1 }} />
</SafeAreaView>
);
export default MapInModal;