diff --git a/docs/imagebackground.md b/docs/imagebackground.md index e22365eb0dc..cdc3a3496bd 100644 --- a/docs/imagebackground.md +++ b/docs/imagebackground.md @@ -11,12 +11,36 @@ Note that you must specify some width and height style attributes. ## Example -```jsx -return ( - - Inside - +```SnackPlayer name=ImageBackground +import React from "react"; +import { ImageBackground, StyleSheet, Text, View } from "react-native"; + +const image = { uri: "https://facebook.github.io/react/logo-og.png" }; + +export default App = () => ( + + + Inside + + ); + +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: "column" + }, + image: { + flex: 1, + resizeMode: "cover", + justifyContent: "center" + }, + text: { + color: "grey", + fontSize: 30, + fontWeight: "bold" + } +}); ``` ---