Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change deprecated View.propTypes to ViewPropTypes #478

Merged
merged 1 commit into from
Jul 10, 2017
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
5 changes: 3 additions & 2 deletions example/CustomActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
StyleSheet,
TouchableOpacity,
View,
ViewPropTypes,
Text,
} from 'react-native';

Expand Down Expand Up @@ -197,7 +198,7 @@ CustomActions.propTypes = {
onSend: React.PropTypes.func,
options: React.PropTypes.object,
icon: React.PropTypes.func,
containerStyle: View.propTypes.style,
wrapperStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
iconTextStyle: Text.propTypes.style,
};
6 changes: 3 additions & 3 deletions example/CustomView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Platform,
StyleSheet,
TouchableOpacity,
View,
ViewPropTypes,
} from 'react-native';

export default class CustomView extends React.Component {
Expand Down Expand Up @@ -64,6 +64,6 @@ CustomView.defaultProps = {

CustomView.propTypes = {
currentMessage: React.PropTypes.object,
containerStyle: View.propTypes.style,
mapViewStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
mapViewStyle: ViewPropTypes.style,
};
3 changes: 2 additions & 1 deletion src/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Text,
TouchableOpacity,
View,
ViewPropTypes,
} from 'react-native';

export default class Actions extends React.Component {
Expand Down Expand Up @@ -104,6 +105,6 @@ Actions.propTypes = {
optionTintColor: React.PropTypes.string,
icon: React.PropTypes.func,
onPressActionButton: React.PropTypes.func,
containerStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
iconTextStyle: Text.propTypes.style,
};
10 changes: 5 additions & 5 deletions src/Avatar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import {Image, StyleSheet, View} from "react-native";
import {Image, StyleSheet, View, ViewPropTypes} from "react-native";
import GiftedAvatar from "./GiftedAvatar";
import {isSameUser, isSameDay, warnDeprecated} from "./utils";

Expand Down Expand Up @@ -98,12 +98,12 @@ Avatar.propTypes = {
nextMessage: React.PropTypes.object,
onPressAvatar: React.PropTypes.func,
containerStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
imageStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
//TODO: remove in next major release
isSameDay: React.PropTypes.func,
Expand Down
21 changes: 11 additions & 10 deletions src/Bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
StyleSheet,
TouchableWithoutFeedback,
View,
ViewPropTypes,
} from 'react-native';

import MessageText from './MessageText';
Expand Down Expand Up @@ -237,25 +238,25 @@ Bubble.propTypes = {
nextMessage: React.PropTypes.object,
previousMessage: React.PropTypes.object,
containerStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
wrapperStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
bottomContainerStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
tickStyle: Text.propTypes.style,
containerToNextStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
containerToPreviousStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
//TODO: remove in next major release
isSameDay: React.PropTypes.func,
Expand Down
5 changes: 3 additions & 2 deletions src/Day.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
StyleSheet,
Text,
View,
ViewPropTypes,
} from 'react-native';

import moment from 'moment/min/moment-with-locales.min';
Expand Down Expand Up @@ -70,8 +71,8 @@ Day.defaultProps = {
Day.propTypes = {
currentMessage: React.PropTypes.object,
previousMessage: React.PropTypes.object,
containerStyle: View.propTypes.style,
wrapperStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
textStyle: Text.propTypes.style,
//TODO: remove in next major release
isSameDay: React.PropTypes.func,
Expand Down
7 changes: 4 additions & 3 deletions src/InputToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import {
StyleSheet,
View,
ViewPropTypes,
} from 'react-native';

import Composer from './Composer';
Expand Down Expand Up @@ -93,7 +94,7 @@ InputToolbar.propTypes = {
renderSend: React.PropTypes.func,
renderComposer: React.PropTypes.func,
onPressActionButton: React.PropTypes.func,
containerStyle: View.propTypes.style,
primaryStyle: View.propTypes.style,
accessoryStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
primaryStyle: ViewPropTypes.style,
accessoryStyle: ViewPropTypes.style,
};
7 changes: 4 additions & 3 deletions src/LoadEarlier.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Text,
TouchableOpacity,
View,
ViewPropTypes,
} from 'react-native';

export default class LoadEarlier extends React.Component {
Expand Down Expand Up @@ -94,8 +95,8 @@ LoadEarlier.propTypes = {
onLoadEarlier: React.PropTypes.func,
isLoadingEarlier: React.PropTypes.bool,
label: React.PropTypes.string,
containerStyle: View.propTypes.style,
wrapperStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
textStyle: Text.propTypes.style,
activityIndicatorStyle: View.propTypes.style,
activityIndicatorStyle: ViewPropTypes.style,
};
5 changes: 3 additions & 2 deletions src/Message.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import {
View,
ViewPropTypes,
StyleSheet,
} from 'react-native';

Expand Down Expand Up @@ -107,7 +108,7 @@ Message.propTypes = {
previousMessage: React.PropTypes.object,
user: React.PropTypes.object,
containerStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
};
3 changes: 2 additions & 1 deletion src/MessageImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Image,
StyleSheet,
View,
ViewPropTypes,
Dimensions,
} from 'react-native';
import Lightbox from 'react-native-lightbox';
Expand Down Expand Up @@ -57,7 +58,7 @@ MessageImage.defaultProps = {

MessageImage.propTypes = {
currentMessage: React.PropTypes.object,
containerStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
imageStyle: Image.propTypes.style,
imageProps: React.PropTypes.object,
lightboxProps: React.PropTypes.object,
Expand Down
5 changes: 3 additions & 2 deletions src/MessageText.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
StyleSheet,
Text,
View,
ViewPropTypes,
} from 'react-native';

import ParsedText from 'react-native-parsed-text';
Expand Down Expand Up @@ -120,8 +121,8 @@ MessageText.propTypes = {
position: React.PropTypes.oneOf(['left', 'right']),
currentMessage: React.PropTypes.object,
containerStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
textStyle: React.PropTypes.shape({
left: Text.propTypes.style,
Expand Down
3 changes: 2 additions & 1 deletion src/Send.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Text,
TouchableOpacity,
View,
ViewPropTypes,
} from 'react-native';

export default class Send extends React.Component {
Expand Down Expand Up @@ -59,6 +60,6 @@ Send.propTypes = {
text: React.PropTypes.string,
onSend: React.PropTypes.func,
label: React.PropTypes.string,
containerStyle: View.propTypes.style,
containerStyle: ViewPropTypes.style,
textStyle: Text.propTypes.style,
};
5 changes: 3 additions & 2 deletions src/Time.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
StyleSheet,
Text,
View,
ViewPropTypes,
} from 'react-native';

import moment from 'moment/min/moment-with-locales.min';
Expand Down Expand Up @@ -69,8 +70,8 @@ Time.propTypes = {
position: React.PropTypes.oneOf(['left', 'right']),
currentMessage: React.PropTypes.object,
containerStyle: React.PropTypes.shape({
left: View.propTypes.style,
right: View.propTypes.style,
left: ViewPropTypes.style,
right: ViewPropTypes.style,
}),
textStyle: React.PropTypes.shape({
left: Text.propTypes.style,
Expand Down