Skip to content

Instantly share code, notes, and snippets.

@m4har
Created May 15, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4har/be130381c50e7e32d97067fdd898ee05 to your computer and use it in GitHub Desktop.
Save m4har/be130381c50e7e32d97067fdd898ee05 to your computer and use it in GitHub Desktop.
component Gradient View
// src/components/Gradient/index.js
// contoh disini dengan gambar
import React from "react";
import { ImageBackground, StatusBar } from "react-native";
const Gradient = ({ children, style }) => (
<ImageBackground
source={require("../../assets/img/bg.png")}
style={style}
resizeMode="stretch"
>
<StatusBar
translucent={true}
backgroundColor={"rgba(0,0,0,0)"}
barStyle="light-content"
/>
{children}
</ImageBackground>
);
export default Gradient;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment