/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow * @providesModule LayoutExample */ 'use strict'; var React = require('react'); var ReactNative = require('react-native'); var { StyleSheet, Text, View, } = ReactNative; var RNTesterBlock = require('./RNTesterBlock'); var RNTesterPage = require('./RNTesterPage'); class Circle extends React.Component<$FlowFixMeProps> { render() { var size = this.props.size || 20; var backgroundColor = this.props.bgColor || '#527fe4'; return ( ); } } class CircleBlock extends React.Component<$FlowFixMeProps> { render() { var circleStyle = { flexDirection: 'row', backgroundColor: '#f6f7f8', borderWidth: 0.5, borderColor: '#d6d7da', marginBottom: 2, }; return ( {this.props.children} ); } } class LayoutExample extends React.Component<$FlowFixMeProps> { static title = 'Layout - Flexbox'; static description = 'Examples of using the flexbox API to layout views.'; static displayName = 'LayoutExample'; render() { var fiveColoredCircles = [ , , , , ]; return ( row {fiveColoredCircles} row-reverse {fiveColoredCircles} column {fiveColoredCircles} column-reverse {fiveColoredCircles} {'top: 15, left: 160'} flex-start {fiveColoredCircles} center {fiveColoredCircles} flex-end {fiveColoredCircles} space-between {fiveColoredCircles} space-around {fiveColoredCircles} flex-start center flex-end {'oooooooooooooooo'.split('').map((char, i) => )} ); } } var styles = StyleSheet.create({ overlay: { backgroundColor: '#aaccff', borderRadius: 10, borderWidth: 0.5, opacity: 0.5, padding: 5, }, }); module.exports = LayoutExample;