import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { View, Text, StyleSheet } from 'react-native'; export class Cell extends Component { static propTypes = { style: PropTypes.object, textStyle: PropTypes.object, borderStyle: PropTypes.object }; render() { const { data, width, height, flex, style, textStyle, borderStyle, ...props } = this.props; const textDom = React.isValidElement(data) ? ( data ) : ( {data} ); const borderTopWidth = (borderStyle && borderStyle.borderWidth) || 0; const borderRightWidth = borderTopWidth; const borderColor = (borderStyle && borderStyle.borderColor) || '#000'; return ( {textDom} ); } } const styles = StyleSheet.create({ cell: { justifyContent: 'center' }, text: { backgroundColor: 'transparent' } });