ilink-world/screens/ads/BannerAds.js

78 lines
2.2 KiB
JavaScript

import React,{Component} from 'react';
import PropTypes from 'prop-types';
import {
Platform, StyleSheet, Text,
TouchableWithoutFeedback, View, TextInput,
WebView,
Animated, Dimensions, Image, PermissionsAndroid,
StatusBar, TouchableNativeFeedback, TouchableOpacity,BackHandler,Alert,ProgressBarAndroid
, NativeModules, Picker, FlatList
} from 'react-native';
import CardView from "react-native-cardview"
import {responsiveHeight,responsiveWidth} from "react-native-responsive-dimensions"
import BaseScreen from "../BaseScreen";
import Icon from "react-native-vector-icons/MaterialIcons";
import Button from "apsl-react-native-button"
type Props = {};
const route=require("./../../route.json")
const BannerAds = (props) => {
const { children, hide, style } = props;
if (hide) {
return null;
}
return (
<View {...this.props} style={style}>
<View style={styles.parent} >
<CardView style={styles.container}>
<Icon.Button
name={"close"}
color={"white"}
onPress={()=>{
this.hide=true
}}
style={{borderRadius:0}}
>Fermer</Icon.Button>
<WebView
source={{uri: 'https://github.com/facebook/react-native'}}
style={{flex:1}}
/>
</CardView>
</View></View>
);
}
BannerAds.propTypes = {
children: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element,
PropTypes.number,
PropTypes.arrayOf(PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.element,
])),
]).isRequired,
hide: PropTypes.bool,
};
const styles=StyleSheet.create({
container:{
flex:1,
width:responsiveWidth(100),
height:responsiveHeight(15),
justifyContent:'center',
backgroundColor:"white"
},
parent:{
width:responsiveWidth(100),
height:responsiveHeight(15),
justifyContent:'center',
alignItems:'center',
backgroundColor:"#000000AE"
}
})
export default BannerAds