Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Get rid of deprecated ViewPropTypes, etc #138

Merged
merged 2 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions components/cell.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { Component } from 'react';
import { View, ViewPropTypes, Text, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
import { View, Text, StyleSheet } from 'react-native';

export class Cell extends Component {
static propTypes = {
style: ViewPropTypes.style,
textStyle: Text.propTypes.style,
borderStyle: ViewPropTypes.style
style: PropTypes.object,
textStyle: PropTypes.object,
borderStyle: PropTypes.object
};

render() {
Expand Down
10 changes: 5 additions & 5 deletions components/cols.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, ViewPropTypes, Text, StyleSheet } from 'react-native';
import { View, Text, StyleSheet } from 'react-native';
import { Cell } from './cell';
import { sum } from '../utils';

export class Col extends Component {
static propTypes = {
width: PropTypes.number,
style: ViewPropTypes.style,
textStyle: Text.propTypes.style
style: PropTypes.object,
textStyle: PropTypes.object
};

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

export class Cols extends Component {
static propTypes = {
style: ViewPropTypes.style,
textStyle: Text.propTypes.style
style: PropTypes.object,
textStyle: PropTypes.object
};

render() {
Expand Down
11 changes: 6 additions & 5 deletions components/rows.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { Component } from 'react';
import { View, ViewPropTypes, Text, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
import { View, Text, StyleSheet } from 'react-native';
import { Cell } from './cell';
import { sum } from '../utils';

export class Row extends Component {
static propTypes = {
style: ViewPropTypes.style,
textStyle: Text.propTypes.style
style: PropTypes.object,
textStyle: PropTypes.object
};

render() {
Expand All @@ -27,8 +28,8 @@ export class Row extends Component {

export class Rows extends Component {
static propTypes = {
style: ViewPropTypes.style,
textStyle: Text.propTypes.style
style: PropTypes.object,
textStyle: PropTypes.object
};

render() {
Expand Down
9 changes: 5 additions & 4 deletions components/table.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { Component } from 'react';
import { View, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import { View } from 'react-native';

export class Table extends Component {
static propTypes = {
style: ViewPropTypes.style,
borderStyle: ViewPropTypes.style
style: PropTypes.object,
borderStyle: PropTypes.object
};

_renderChildren(props) {
Expand Down Expand Up @@ -41,7 +42,7 @@ export class Table extends Component {

export class TableWrapper extends Component {
static propTypes = {
style: ViewPropTypes.style
style: PropTypes.object
};

_renderChildren(props) {
Expand Down