npm i react-native-modal
import Modal from "react-native-modal";
<Modal>
<View style={{ flex: 1 }}>
<Text>I am the modal content!</Text>
</View>
</Modal>
npm i --save react-native-modal
import Modal from 'react-native-modal';
import Modal from "react-native-modal";
import {useState, Component } from 'react';
import { Alert, Button, StyleSheet, Text, Pressable, View, TouchableOpacity } from "react-native";
import CalendarPicker from 'react-native-calendar-picker';
import Modal from "react-native-modal";
function App()
{
const [isModalVisible, setIsModalVisible] = useState(true);
return (
<View style={{ flex: 1, alignItems:"center", justifyContent:"center" }}>
<View>
<Modal isVisible={isModalVisible}>
<View style={{ flex: 1, justifyContent:"center", alignItems:"center" }}>
<CalendarPicker />
</View>
<TouchableOpacity onPress={()=> setIsModalVisible(!isModalVisible)}>
<Text>
Click Me
</Text>
</TouchableOpacity>
</Modal>
</View>
<TouchableOpacity onPress={()=> setIsModalVisible(!isModalVisible)}>
<Text>
Click Me
</Text>
</TouchableOpacity>
</View>
);
}
export default App;