From 26cc3d4dd9fc7f9b099205e30dc442f080228862 Mon Sep 17 00:00:00 2001 From: Horcrux Date: Thu, 9 Jun 2016 21:15:59 +0800 Subject: [PATCH] change examples layout --- Example/main.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Example/main.js b/Example/main.js index 0fbf6e85..73872541 100644 --- a/Example/main.js +++ b/Example/main.js @@ -4,6 +4,7 @@ */ 'use strict'; import React, {Component} from 'react'; +import {Dimensions} from 'react-native'; import { AppRegistry, @@ -42,7 +43,10 @@ const styles = StyleSheet.create({ borderTopWidth: hairline, borderTopColor: '#ccc', borderBottomWidth: hairline, - borderBottomColor: '#ccc' + borderBottomColor: '#ccc', + flexWrap: 'wrap', + flexDirection: 'row', + marginHorizontal: 10 }, welcome: { padding: 10, @@ -51,14 +55,14 @@ const styles = StyleSheet.create({ fontWeight: 'bold' }, link: { - marginHorizontal: 10, - alignSelf: 'stretch' + alignSelf: 'stretch', + width: Dimensions.get('window').width / 2 - 10 }, title: { marginLeft: 10 }, cell: { - height: 30, + height: 40, paddingHorizontal: 10, alignSelf: 'stretch', alignItems: 'center', @@ -241,12 +245,11 @@ class SvgExample extends Component { SVG library for React Native - {this.getExamples()} - + ; } }