react-native-table-component
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -23,3 +23,3 @@ import React, { Component } from 'react'; | ||
render() { | ||
let borderWidth,borderColor; | ||
let borderWidth, borderColor; | ||
if (this.props.borderStyle && this.props.borderStyle.borderWidth) { | ||
@@ -51,3 +51,3 @@ borderWidth = this.props.borderStyle.borderWidth; | ||
class TableWraper extends Component { | ||
class TableWrapper extends Component { | ||
static propTypes = { | ||
@@ -79,2 +79,2 @@ style: View.propTypes.style, | ||
export {Table, TableWraper}; | ||
export {Table, TableWrapper}; |
import { Row, Rows } from './components/rows'; | ||
import { Col, Cols } from './components/cols'; | ||
import { Table, TableWraper } from './components/table'; | ||
import { Table, TableWrapper } from './components/table'; | ||
import Cell from './components/cell'; | ||
export { Table, TableWraper, Row, Rows, Col, Cols, Cell }; | ||
export { Table, TableWrapper, Row, Rows, Col, Cols, Cell }; |
{ | ||
"name": "react-native-table-component", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Build table for react native.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,2 +7,3 @@ # React Native Table Component | ||
- [Installation](#installation) | ||
- [Changelogs](#Changelogs) | ||
- [Examples](#examples) | ||
@@ -17,6 +18,11 @@ - [Properties](#properties) | ||
```jsx | ||
import { Table, TableWraper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
import { Table, TableWrapper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
``` | ||
<br/><br/> | ||
## Changelogs | ||
+ [v1.0.3] | ||
- 'Wraper' changed to 'Wrapper'; | ||
<br/><br/> | ||
## Examples | ||
@@ -30,3 +36,3 @@ | ||
import { View, StyleSheet } from "react-native"; | ||
import { Table, TableWraper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
import { Table, TableWrapper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
@@ -67,3 +73,3 @@ class tableView extends Component { | ||
import { View, StyleSheet } from "react-native"; | ||
import { Table, TableWraper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
import { Table, TableWrapper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
@@ -106,3 +112,3 @@ class tableView extends Component { | ||
import { View, StyleSheet } from "react-native"; | ||
import { Table, TableWraper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
import { Table, TableWrapper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
@@ -121,6 +127,6 @@ class tableView extends Component { | ||
<Row data={tableHead} flexArr={[1, 2, 1, 1]} style={styles.head} textStyle={styles.text}/> | ||
<TableWraper style={{flexDirection: 'row'}}> | ||
<TableWrapper style={{flexDirection: 'row'}}> | ||
<Col data={tableTitle} style={styles.title} heightArr={[28,28]} textStyle={styles.text}/> | ||
<Rows data={tableData} flexArr={[2, 1, 1]} style={styles.row}/> | ||
</TableWraper> | ||
</TableWrapper> | ||
</Table> | ||
@@ -148,3 +154,3 @@ </View> | ||
import { View, StyleSheet } from "react-native"; | ||
import { Table, TableWraper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
import { Table, TableWrapper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
@@ -163,15 +169,15 @@ class tableThreeView extends Component { | ||
<Table style={{flexDirection: 'row'}}> | ||
{/* Left wraper */} | ||
<TableWraper style={{width: 80}}> | ||
{/* Left Wrapper */} | ||
<TableWrapper style={{width: 80}}> | ||
<Cell data="Head" style={styles.singleHead}/> | ||
<TableWraper style={{flexDirection: 'row'}}> | ||
<TableWrapper style={{flexDirection: 'row'}}> | ||
<Col data={['Head2', 'Head3']} style={styles.head} heightArr={[56, 56]}/> | ||
<Col data={['Title', 'Title2', 'Title3', 'Title4']} style={styles.title} heightArr={[28, 28, 28, 28]} textStyle={styles.text}></Col> | ||
</TableWraper> | ||
</TableWraper> | ||
</TableWrapper> | ||
</TableWrapper> | ||
{/* Right wraper */} | ||
<TableWraper style={{flex:1}}> | ||
{/* Right Wrapper */} | ||
<TableWrapper style={{flex:1}}> | ||
<Rows data={tableData} style={{height: 28}}/> | ||
</TableWraper> | ||
</TableWrapper> | ||
</Table> | ||
@@ -199,3 +205,3 @@ </View> | ||
import { View, StyleSheet, ScrollView } from "react-native"; | ||
import { Table, TableWraper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
import { Table, TableWrapper, Row, Rows, Col, Cols, Cell } from 'react-native-table-component'; | ||
@@ -218,4 +224,4 @@ class tableFourView extends Component { | ||
<Table style={styles.table}> | ||
{/* Left wraper */} | ||
<TableWraper style={{width: 80}}> | ||
{/* Left Wrapper */} | ||
<TableWrapper style={{width: 80}}> | ||
<Cell data="Head" style={styles.head} textStyle={styles.headText}/> | ||
@@ -227,8 +233,8 @@ { | ||
} | ||
</TableWraper> | ||
</TableWrapper> | ||
{/* Right scrollview wraper */} | ||
{/* Right scrollview Wrapper */} | ||
<ScrollView horizontal={true}> | ||
{/* If parent element is not table element, you should add the type of borderstyle. */} | ||
<TableWraper borderStyle={{borderWidth: 1,borderColor: '#000',}}> | ||
<TableWrapper borderStyle={{borderWidth: 1,borderColor: '#000',}}> | ||
<Row data={tableHead} style={styles.head} textStyle={styles.headText} widthArr={widthArr}/> | ||
@@ -240,3 +246,3 @@ { | ||
} | ||
</TableWraper> | ||
</TableWrapper> | ||
</ScrollView> | ||
@@ -243,0 +249,0 @@ </Table> |
16918
265