Skip to content

Commit

Permalink
Remove ViewPropTypes references (FaridSafi#1694)
Browse files Browse the repository at this point in the history
ViewPropTypes is no longer supported on react-native-web > 0.12.0 as described on this issue necolas/react-native-web#1537
  • Loading branch information
Kabangi authored Mar 22, 2020
1 parent 4bdc295 commit aecfa34
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions src/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Text,
TouchableOpacity,
View,
ViewPropTypes,

StyleProp,
ViewStyle,
TextStyle,
Expand Down Expand Up @@ -38,8 +38,8 @@ export default class Actions extends React.Component<ActionsProps> {
optionTintColor: PropTypes.string,
icon: PropTypes.func,
onPressActionButton: PropTypes.func,
wrapperStyle: ViewPropTypes.style,
containerStyle: ViewPropTypes.style,
wrapperStyle: {},
containerStyle: {},
}

static contextTypes = {
Expand Down
10 changes: 5 additions & 5 deletions src/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { ReactNode } from 'react'
import {
StyleSheet,
View,
ViewPropTypes,

ImageStyle,
ViewStyle,
} from 'react-native'
Expand Down Expand Up @@ -85,12 +85,12 @@ export default class Avatar<
onLongPressAvatar: PropTypes.func,
renderAvatar: PropTypes.func,
containerStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
imageStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
}

Expand Down
22 changes: 11 additions & 11 deletions src/Bubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
StyleSheet,
TouchableWithoutFeedback,
View,
ViewPropTypes,

StyleProp,
ViewStyle,
TextStyle,
Expand Down Expand Up @@ -213,26 +213,26 @@ export default class Bubble<
nextMessage: PropTypes.object,
previousMessage: PropTypes.object,
containerStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
wrapperStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
bottomContainerStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
tickStyle: PropTypes.any,
usernameStyle: PropTypes.any,
containerToNextStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
containerToPreviousStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
}

Expand Down
6 changes: 3 additions & 3 deletions src/Day.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
StyleSheet,
Text,
View,
ViewPropTypes,

StyleProp,
ViewStyle,
TextStyle,
Expand Down Expand Up @@ -68,8 +68,8 @@ export default class Day<
previousMessage: PropTypes.object,
nextMessage: PropTypes.object,
inverted: PropTypes.bool,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
containerStyle: {},
wrapperStyle: {},
textStyle: PropTypes.any,
dateFormat: PropTypes.string,
}
Expand Down
8 changes: 4 additions & 4 deletions src/InputToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
StyleSheet,
View,
Keyboard,
ViewPropTypes,

EmitterSubscription,
StyleProp,
ViewStyle,
Expand Down Expand Up @@ -67,9 +67,9 @@ export default class InputToolbar extends React.Component<
renderSend: PropTypes.func,
renderComposer: PropTypes.func,
onPressActionButton: PropTypes.func,
containerStyle: ViewPropTypes.style,
primaryStyle: ViewPropTypes.style,
accessoryStyle: ViewPropTypes.style,
containerStyle: {},
primaryStyle: {},
accessoryStyle: {},
}

state = {
Expand Down
8 changes: 4 additions & 4 deletions src/LoadEarlier.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Text,
TouchableOpacity,
View,
ViewPropTypes,

StyleProp,
ViewStyle,
TextStyle,
Expand Down Expand Up @@ -72,10 +72,10 @@ export default class LoadEarlier extends React.Component<LoadEarlierProps> {
onLoadEarlier: PropTypes.func,
isLoadingEarlier: PropTypes.bool,
label: PropTypes.string,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
containerStyle: {},
wrapperStyle: {},
textStyle: PropTypes.any,
activityIndicatorStyle: ViewPropTypes.style,
activityIndicatorStyle: {},
activityIndicatorColor: PropTypes.string,
activityIndicatorSize: PropTypes.string,
}
Expand Down
6 changes: 3 additions & 3 deletions src/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types'
import React from 'react'
import { View, ViewPropTypes, StyleSheet, ViewStyle } from 'react-native'
import { View, StyleSheet, ViewStyle } from 'react-native'

import Avatar from './Avatar'
import Bubble from './Bubble'
Expand Down Expand Up @@ -83,8 +83,8 @@ export default class Message<
user: PropTypes.object,
inverted: PropTypes.bool,
containerStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
shouldUpdateMessage: PropTypes.func,
}
Expand Down
4 changes: 2 additions & 2 deletions src/MessageImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Image,
StyleSheet,
View,
ViewPropTypes,

ImageProps,
ViewStyle,
StyleProp,
Expand Down Expand Up @@ -53,7 +53,7 @@ export default class MessageImage<

static propTypes = {
currentMessage: PropTypes.object,
containerStyle: ViewPropTypes.style,
containerStyle: {},
imageStyle: PropTypes.object,
imageProps: PropTypes.object,
lightboxProps: PropTypes.object,
Expand Down
6 changes: 3 additions & 3 deletions src/MessageText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Linking,
StyleSheet,
View,
ViewPropTypes,

TextProps,
StyleProp,
ViewStyle,
Expand Down Expand Up @@ -92,8 +92,8 @@ export default class MessageText<
optionTitles: PropTypes.arrayOf(PropTypes.string),
currentMessage: PropTypes.object,
containerStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
textStyle: PropTypes.shape({
left: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
Expand Down
4 changes: 2 additions & 2 deletions src/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Text,
TouchableOpacity,
View,
ViewPropTypes,

StyleProp,
ViewStyle,
TextStyle,
Expand Down Expand Up @@ -58,7 +58,7 @@ export default class Send extends Component<SendProps> {
text: PropTypes.string,
onSend: PropTypes.func,
label: PropTypes.string,
containerStyle: ViewPropTypes.style,
containerStyle: {},
textStyle: PropTypes.any,
children: PropTypes.element,
alwaysShowSend: PropTypes.bool,
Expand Down
6 changes: 3 additions & 3 deletions src/SystemMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
StyleSheet,
Text,
View,
ViewPropTypes,

ViewStyle,
StyleProp,
TextStyle,
Expand Down Expand Up @@ -49,8 +49,8 @@ export default class SystemMessage<

static propTypes = {
currentMessage: PropTypes.object,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
containerStyle: {},
wrapperStyle: {},
textStyle: PropTypes.any,
}

Expand Down
6 changes: 3 additions & 3 deletions src/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
StyleSheet,
Text,
View,
ViewPropTypes,

ViewStyle,
TextStyle,
} from 'react-native'
Expand Down Expand Up @@ -77,8 +77,8 @@ export default class Time<
position: PropTypes.oneOf(['left', 'right']),
currentMessage: PropTypes.object,
containerStyle: PropTypes.shape({
left: ViewPropTypes.style,
right: ViewPropTypes.style,
left: {},
right: {},
}),
timeFormat: PropTypes.string,
timeTextStyle: PropTypes.shape({
Expand Down

0 comments on commit aecfa34

Please sign in to comment.