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:
Brent Vatne 2015-10-08 13:46:33 -07:00 коммит произвёл facebook-github-bot-8
Родитель 7fe7a2a26b
Коммит 1fd2e176ae
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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>
* );
* },