Skip to content

Commit

Permalink
dohooo#145 fixed PropTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
slice312 committed Mar 3, 2022
1 parent b2ff845 commit 96f9ed0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
8 changes: 6 additions & 2 deletions components/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import { View, Text, StyleSheet } from 'react-native';

export class Cell extends Component {
static propTypes = {
style: PropTypes.object,
textStyle: PropTypes.object,
data: PropTypes.array,
width: PropTypes.number,
height: PropTypes.number,
flex: PropTypes.number,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
borderStyle: PropTypes.object
};

Expand Down
15 changes: 11 additions & 4 deletions components/cols.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ import { sum } from '../utils';

export class Col extends Component {
static propTypes = {
data: PropTypes.array,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
width: PropTypes.number,
style: PropTypes.object,
textStyle: PropTypes.object
heightArr: PropTypes.arrayOf(PropTypes.number),
flex: PropTypes.number,
textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
};

render() {
Expand All @@ -27,8 +30,12 @@ export class Col extends Component {

export class Cols extends Component {
static propTypes = {
style: PropTypes.object,
textStyle: PropTypes.object
data: PropTypes.array,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
widthArr: PropTypes.arrayOf(PropTypes.number),
heightArr: PropTypes.arrayOf(PropTypes.number),
flexArr: PropTypes.arrayOf(PropTypes.number),
textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
};

render() {
Expand Down
17 changes: 13 additions & 4 deletions components/rows.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ import { sum } from '../utils';

export class Row extends Component {
static propTypes = {
style: PropTypes.object,
textStyle: PropTypes.object
data: PropTypes.array,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
widthArr: PropTypes.arrayOf(PropTypes.number),
height: PropTypes.number,
flexArr: PropTypes.arrayOf(PropTypes.number),
textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
cellTextStyle: PropTypes.func
};

render() {
Expand Down Expand Up @@ -38,8 +43,12 @@ export class Row extends Component {

export class Rows extends Component {
static propTypes = {
style: PropTypes.object,
textStyle: PropTypes.object
data: PropTypes.array,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
widthArr: PropTypes.arrayOf(PropTypes.number),
heightArr: PropTypes.arrayOf(PropTypes.number),
flexArr: PropTypes.arrayOf(PropTypes.number),
textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
};

render() {
Expand Down
4 changes: 2 additions & 2 deletions components/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { View } from 'react-native';

export class Table extends Component {
static propTypes = {
style: PropTypes.object,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
borderStyle: PropTypes.object
};

Expand Down Expand Up @@ -42,7 +42,7 @@ export class Table extends Component {

export class TableWrapper extends Component {
static propTypes = {
style: PropTypes.object
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
};

_renderChildren(props) {
Expand Down

0 comments on commit 96f9ed0

Please sign in to comment.