Modal Component in React Native expo component #3 | Web Scripts | Crax

Welcome To Crax.Pro Forum!

Check our new Marketplace at Crax.Shop

   Login! SignUp Now!
  • We are in solidarity with our brothers and sisters in Palestine. Free Palestine. To learn more visit this Page

  • Crax.Pro domain has been taken down!

    Alternatives: Craxpro.io | Craxpro.com

Modal Component in React Native expo component #3

Modal Component in React Native expo component #3

LV
0
 

tempcp001

Member
Joined
Jan 7, 2024
Threads
12
Likes
0
Awards
2
Credits
1,206©
Cash
0$
import { AntDesign } from "@expo/vector-icons";
import {
StyleSheet,
View,
Modal as RNModal,
TouchableOpacity,
} from "react-native";
import React from "react";
export default function Modal({ visible, onDismiss, children }) {
return (
<RNModal visible={visible} onDismiss={onDismiss} animationType="slide">
<View
style={{
flex: 1,
paddingHorizontal: 20,
backgroundColor: "#F5F5F5",
paddingTop: 45,
}}
>
<View style={{ flexDirection: "row", justifyContent: "flex-end" }}>
<TouchableOpacity onPress={onDismiss}>
<AntDesign name="close" size={24} color="red" />
</TouchableOpacity>
</View>
{children}
</View>
</RNModal>
);
}
const styles = StyleSheet.create({
option: {
padding: 10,
borderBottomWidth: 1,
borderBottomColor: "#ccc",
},
});
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Top Bottom