Skip to content

tableViewCell

brainpoint edited this page Feb 28, 2017 · 1 revision

Example


'use strict';
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, } from 'react-native';
import { TableCellView, Icons } from 'react-componet'

class app extends Component {
  render() {
    return (
      <TableViewCell
        left={{text:'cellText'}}
        right={Icons.getIconMinArrowRight()}
      />
    );
  }
}

Props.


left

cell左边视图的内容, 可以为以下类型的数据:

  1. 属性对象 { text: PropTypes.string, tintColor: PropTypes.string, style: PropTypes.object, }
  2. 或者为react渲染元素,如

right: PropTypes.element.

cell 右边视图的内容, 为react渲染元素.

onPress: PropTypes.func

点击事件处理函数 ()=> {}

Clone this wiki locally