import React from 'react' ; import { StyleSheet , View , Text , Pressable , Image , SafeAreaView , Platform , StatusBar , } from 'react-native' ; import { useNavigation } from '@react-navigation/native' ; import { DrawerNavigationProp } from '@react-navigation/drawer' ; import Icon from 'react-native-vector-icons/MaterialIcons' ; import { AppImages } from '../res' ; import Config from './Config' ; interface Props { } const InviteFriendScene = ( ) => { const navigation = useNavigation < DrawerNavigationProp < { } > > ( ) ; const marginTop = Platform . OS === 'ios' ? 20 : StatusBar . currentHeight ; return ( < SafeAreaView style = { { flex : 1 , marginTop } } > < View style = { { flexDirection : 'row' , padding : 8 , paddingBottom : 0 } } > < Pressable style = { ( { pressed } ) => [ { padding : 8 , paddingBottom : 0 , opacity : ! Config . isAndroid && pressed ? 0.4 : 1 , } , ] } onPress = { ( ) => navigation . toggleDrawer ( ) } android_ripple = { { color : 'grey' , radius : 20 , borderless : true } } > < Icon name = "menu" size = { 25 } color = "black" / > < /Pressable> < /View> < Image style = { styles . image } source = { AppImages . inviteImage } resizeMode = "cover" / > < Text style = { styles . title } > Invite Your Friends < /Text> < Text style = { styles . subTitle } > Are you one of those who makes everything { '\n' } at the last moment ? < /Text> < View style = { { flex : 1 , justifyContent : 'center' , alignItems : 'center' } } > < Pressable style = { ( { pressed } ) => [ styles . button , { opacity : ! Config . isAndroid && pressed ? 0.4 : 1 } , ] } android_ripple = { { color : 'grey' } } > < Icon name = "share" size = { 25 } color = "white" / > < Text style = { styles . buttonText } > Share < /Text> < /Pressable> < /View> < /SafeAreaView>); } ; const styles = StyleSheet . create ( { image : { paddingHorizontal : 16 , width : undefined , height : 320 , } , title : { fontSize : 20 , fontFamily : 'WorkSans-Bold' , textAlign : 'center' , paddingTop : 8 , } , subTitle : { fontSize : 16 , fontFamily : 'WorkSans-Regular' , textAlign : 'center' , paddingTop : 16 , } , button : { flexDirection : 'row' , width : 140 , height : 40 , padding : 8 , backgroundColor : 'dodgerblue' , borderRadius : 4 , elevation : 8 , alignItems : 'center' , justifyContent : 'center' , } , buttonText : { color : 'white' , fontWeight : '500' , textAlign : 'center' , padding : 4 , } , } ) ; export default InviteFriendScene ;