From 73792fd18413afdf1c947d3345a75114aedbd210 Mon Sep 17 00:00:00 2001 From: Steve Alves-Blyt Date: Wed, 5 Feb 2020 22:21:45 +0100 Subject: [PATCH 1/4] [#1579] update ImageBackground component doc --- docs/imagebackground.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/imagebackground.md b/docs/imagebackground.md index e22365eb0dc..98fe8e0b526 100644 --- a/docs/imagebackground.md +++ b/docs/imagebackground.md @@ -9,14 +9,27 @@ You might not want to use `` in some cases, since the implement Note that you must specify some width and height style attributes. -## Example - ```jsx -return ( Inside -); +``` + +## Example + +```SnackPlayer name=ImageBackground + import React from 'react'; + import {View, ImageBackground, Text} from 'react-native' + + export default function App() { + return ( + + + Inside + + + ) + } ``` --- From 156ec0343c7dbf0a19397e710228fadc57b83767 Mon Sep 17 00:00:00 2001 From: Steve Alves-Blyt Date: Fri, 21 Feb 2020 15:45:59 +0100 Subject: [PATCH 2/4] [#1579] changes requested --- docs/imagebackground.md | 44 +++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/docs/imagebackground.md b/docs/imagebackground.md index 98fe8e0b526..3c8f34c8174 100644 --- a/docs/imagebackground.md +++ b/docs/imagebackground.md @@ -9,27 +9,37 @@ You might not want to use `` in some cases, since the implement Note that you must specify some width and height style attributes. -```jsx - - Inside - -``` - ## Example ```SnackPlayer name=ImageBackground - import React from 'react'; - import {View, ImageBackground, Text} from 'react-native' - - export default function App() { - return ( - - - Inside - - - ) +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: { + fontSize: 30, + fontWeight: 'bold', } +}); ``` --- From 100a80c84e5e55d18a234134afd42eb61ef56928 Mon Sep 17 00:00:00 2001 From: R Nabors Date: Mon, 24 Feb 2020 14:54:45 +0000 Subject: [PATCH 3/4] Update imagebackground.md Prettier-ed --- docs/imagebackground.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/imagebackground.md b/docs/imagebackground.md index 3c8f34c8174..c638e262eb1 100644 --- a/docs/imagebackground.md +++ b/docs/imagebackground.md @@ -12,10 +12,10 @@ Note that you must specify some width and height style attributes. ## Example ```SnackPlayer name=ImageBackground -import React from 'react'; -import { ImageBackground, StyleSheet, Text, View } from 'react-native'; +import React from "react"; +import { ImageBackground, StyleSheet, Text, View } from "react-native"; -const image = { uri: 'https://facebook.github.io/react/logo-og.png' }; +const image = { uri: "https://facebook.github.io/react/logo-og.png" }; export default App = () => ( @@ -28,16 +28,16 @@ export default App = () => ( const styles = StyleSheet.create({ container: { flex: 1, - flexDirection: 'column', + flexDirection: "column" }, image: { flex: 1, - resizeMode: 'cover', - justifyContent: 'center', + resizeMode: "cover", + justifyContent: "center" }, text: { fontSize: 30, - fontWeight: 'bold', + fontWeight: "bold" } }); ``` From 35735fc4cc5eda4ed61dd1250d1b99f49bf7a28d Mon Sep 17 00:00:00 2001 From: R Nabors Date: Fri, 28 Feb 2020 17:18:02 +0000 Subject: [PATCH 4/4] giving the text color to stand out --- docs/imagebackground.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/imagebackground.md b/docs/imagebackground.md index c638e262eb1..cdc3a3496bd 100644 --- a/docs/imagebackground.md +++ b/docs/imagebackground.md @@ -36,6 +36,7 @@ const styles = StyleSheet.create({ justifyContent: "center" }, text: { + color: "grey", fontSize: 30, fontWeight: "bold" }