content: /**
   *
   * Created by tkfeng on 4/14/17.
   */
  import React from 'react';
  import {
    View,
    Text,
    Divider,
    Icon,
    Button,
    Row,
    Subtitle,
    Screen,
    Heading,
  } from '@shoutem/ui';
  
  export default class TouchableRow extends React.Component {
    static propTypes = {
      title: React.PropTypes.string,
      iconName: React.PropTypes.string,
      onPress: React.PropTypes.func,
    };
  
    static defaultProps = {
      title: 'Title',
      iconName: 'web',
    };
  
    render() {
      let rightArrow = <Icon styleName="disclosure" name="right-arrow"/>;
      if (this.props.onPress == null) {
        rightArrow = null;
      }
      return (
        <View>
          <Divider/>
          <Button onPress={this.props.onPress}>
            <Row>
              <Icon name={this.props.iconName}/>
              <View styleName="vertical">
                <Subtitle>{this.props.title}</Subtitle>
                {this.props.children}
              </View>
              {rightArrow}
            </Row>
          </Button>
        </View>
      );
    }
  }