Fix broken code block and make the example nicer
Summary: @kmagiera @mkonicek - made a mistake while updating it, removed the `margin` style for some reason on the inner Text (it was 1am, ¯\_(ツ)_/¯). This also makes the example nicer looking - style the navigation with a white background, center the text in the main content view. ![](http://url.brentvatne.ca/16xXe.png) ![](http://url.brentvatne.ca/1a4Jt.png) Closes https://github.com/facebook/react-native/pull/2682 Reviewed By: @svcscm Differential Revision: D2454465 Pulled By: @mkonicek fb-gh-sync-id: 2fa17366b34ae31c490d37791ad693c17ac3f128
This commit is contained in:
parent
7fe7a2a26b
commit
1fd2e176ae
|
@ -50,15 +50,19 @@ var DRAWER_STATES = [
|
|||
* ```
|
||||
* render: function() {
|
||||
* var navigationView = (
|
||||
* <Text style={{margin: 10, fontSize: 15, textAlign: 'left'}}>I'm in the Drawer!</Text>
|
||||
* <View style={{flex: 1, backgroundColor: '#fff'}}>
|
||||
* <Text style={{margin: 10, fontSize: 15, textAlign: 'left'}}>I'm in the Drawer!</Text>
|
||||
* </View>
|
||||
* );
|
||||
* return (
|
||||
* <DrawerLayoutAndroid
|
||||
* drawerWidth={300}
|
||||
* drawerPosition={DrawerLayoutAndroid.positions.Left}
|
||||
* renderNavigationView={() => navigationView}>
|
||||
* <Text style={{margin: 10, fontSize: 15, textAlign: 'right'}}>Hello</Text>
|
||||
* <Text style={{margin: 10, fontSize: 15, textAlign: 'right'}}>World!</Text>
|
||||
* <View style={{flex: 1, alignItems: 'center'}}>
|
||||
* <Text style={{margin: 10, fontSize: 15, textAlign: 'right'}}>Hello</Text>
|
||||
* <Text style={{margin: 10, fontSize: 15, textAlign: 'right'}}>World!</Text>
|
||||
* </View>
|
||||
* </DrawerLayoutAndroid>
|
||||
* );
|
||||
* },
|
||||
|
|
Loading…
Reference in New Issue