mirror of
https://github.com/expo/gl-react-native.git
synced 2026-11-15 17:34:35 -10:00
20 lines
501 B
JavaScript
20 lines
501 B
JavaScript
const React = require("react-native");
|
|
const {
|
|
View
|
|
} = React;
|
|
|
|
class NativeLayer extends React.Component {
|
|
render () {
|
|
const { width, height, children, ...rest } = this.props;
|
|
return <View style={{ width, height, position: "relative" }}>
|
|
{React.Children.map(children, child =>
|
|
<View style={{ width, height, position: "absolute", top: 0, left: 0, backgroundColor: "transparent" }}>
|
|
{child}
|
|
</View>
|
|
)}
|
|
</View>;
|
|
}
|
|
}
|
|
|
|
module.exports = NativeLayer;
|