react-native-sdj-widgets
Version:
组件库
39 lines (33 loc) • 1.01 kB
JavaScript
/*
* @Author: 谭林伟
* @Date: 2019-12-26 10:29:27
* @LastEditors : 谭林伟
* @LastEditTime : 2019-12-26 10:35:29
* @Desc:
*/
import React, { Component } from "react";
import { View,SafeAreaView, StyleSheet } from "react-native";
import { Container as ContainerView } from "native-base";
export default class Container extends Component {
render() {
return (
<ContainerView style={[styles.container]} >
<SafeAreaView style={[styles.SafeAreaView, this.props.style]} forceInset={{ top: 'never', bottom: "always" }}>
<View style={[styles.container,this.props.contentStyle]}>
{this.props.children}
</View>
</SafeAreaView>
</ContainerView>
)
}
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#F2F2F2',
flex: 1,
},
SafeAreaView: {
flex: 1,
backgroundColor: "rgba(0,0,0,0)"
}
});