Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Commit

Permalink
Removed deprecated PropTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Cancian committed Apr 9, 2021
1 parent 23a7cca commit 9d38942
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/ActionButton/ActionButton.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const propTypes = {
*/
style: PropTypes.shape({
container: ViewPropTypes.style,
icon: Text.propTypes.style, // eslint-disable-line
icon: PropTypes.any,
}),
};
const defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/Avatar/Avatar.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const propTypes = {
*/
style: PropTypes.shape({
container: ViewPropTypes.style,
content: Text.propTypes.style, // eslint-disable-line
content: PropTypes.any,
}),
iconSet: PropTypes.string,
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Badge/Badge.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const propTypes = {
PropTypes.shape({
container: ViewPropTypes.style,
strokeContainer: ViewPropTypes.style,
content: Text.propTypes.style, // eslint-disable-line
content: PropTypes.any,
}),
PropTypes.array,
]),
Expand Down
4 changes: 2 additions & 2 deletions src/BottomNavigation/BottomNavigationAction.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const propTypes = {
*/
style: PropTypes.shape({
container: ViewPropTypes.style,
active: Text.propTypes.style, // eslint-disable-line
disabled: Text.propTypes.style, // eslint-disable-line
active: PropTypes.any,
disabled: PropTypes.any,
}),
disabled: PropTypes.bool,
};
Expand Down
2 changes: 1 addition & 1 deletion src/Button/Button.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const propTypes = {
*/
style: PropTypes.shape({
container: ViewPropTypes.style,
text: Text.propTypes.style, // eslint-disable-line
text: PropTypes.any,
}),
primary: PropTypes.bool,
accent: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/Checkbox/Checkbox.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const propTypes = {
container: ViewPropTypes.style,
// FIXME:
icon: PropTypes.any, // eslint-disable-line
label: Text.propTypes.style, // eslint-disable-line
label: PropTypes.any,
}),
/**
* Size of icon
Expand Down
2 changes: 1 addition & 1 deletion src/Dialog/Title.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const propTypes = {
children: PropTypes.node.isRequired,
style: PropTypes.shape({
titleContainer: ViewPropTypes.style,
titleText: Text.propTypes.style, // eslint-disable-line
titleText: PropTypes.any,
}),
};
const defaultProps = {
Expand Down
6 changes: 3 additions & 3 deletions src/Drawer/Section.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const propTypes = {
container: ViewPropTypes.style,
item: ViewPropTypes.style,
subheader: ViewPropTypes.style,
icon: Text.propTypes.style, // eslint-disable-line
value: Text.propTypes.style, // eslint-disable-line
label: Text.propTypes.style, // eslint-disable-line
icon: PropTypes.any,
value: PropTypes.any,
label: PropTypes.any,
}),
key: PropTypes.string,
/**
Expand Down
2 changes: 1 addition & 1 deletion src/IconToggle/IconToggle.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const propTypes = {
style: PropTypes.oneOfType([
PropTypes.shape({
container: ViewPropTypes.style,
icon: Text.propTypes.style, // eslint-disable-line
icon: PropTypes.any
}),
PropTypes.array,
]),
Expand Down
8 changes: 4 additions & 4 deletions src/ListItem/ListItem.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ const propTypes = {
leftElementContainer: ViewPropTypes.style,
centerElementContainer: ViewPropTypes.style,
textViewContainer: ViewPropTypes.style,
primaryText: Text.propTypes.style, // eslint-disable-line
primaryText: PropTypes.any,
firstLine: ViewPropTypes.style,
primaryTextContainer: Text.propTypes.style, // eslint-disable-line
secondaryText: Text.propTypes.style, // eslint-disable-line
tertiaryText: Text.propTypes.style, // eslint-disable-line
primaryTextContainer: PropTypes.any,
secondaryText: PropTypes.any,
tertiaryText: PropTypes.any,
rightElementContainer: ViewPropTypes.style,
leftElement: PropTypes.style,
rightElement: PropTypes.style,
Expand Down
2 changes: 1 addition & 1 deletion src/Subheader/Subheader.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const propTypes = {
lines: PropTypes.number,
style: PropTypes.shape({
contaienr: ViewPropTypes.style,
text: Text.propTypes.style, // eslint-disable-line
text: PropTypes.any,
}),
};
const defaultProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/Toolbar/CenterElement.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const propTypes = {
searchValue: PropTypes.string.isRequired,
searchable: PropTypes.shape({
autoFocus: PropTypes.bool,
autoCapitalize: TextInput.propTypes.autoCapitalize, // eslint-disable-line
autoCapitalize: PropTypes.string,
autoCorrect: PropTypes.bool,
onChangeText: PropTypes.func,
onSubmitEditing: PropTypes.func,
placeholder: PropTypes.string,
}),
style: PropTypes.shape({
centerElementContainer: ViewPropTypes.style,
titleText: Text.propTypes.style, // eslint-disable-line
titleText: PropTypes.any,
}),
centerElement: PropTypes.node,
onPress: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion src/Toolbar/LeftElement.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const propTypes = {
isSearchActive: PropTypes.bool.isRequired,
style: PropTypes.shape({
leftElementContainer: ViewPropTypes.style,
leftElement: Text.propTypes.style, // eslint-disable-line
leftElement: PropTypes.any,
}),
size: PropTypes.number,
leftElement: PropTypes.node,
Expand Down
2 changes: 1 addition & 1 deletion src/Toolbar/Toolbar.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const propTypes = {
// FIXME
leftElement: PropTypes.any, // eslint-disable-line
centerElementContainer: ViewPropTypes.style,
titleText: Text.propTypes.style, // eslint-disable-line
titleText: PropTypes.any,
rightElementContainer: ViewPropTypes.style,
rightElement: PropTypes.any, // eslint-disable-line
}),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
View,
BackHandler,
ViewPropTypes as RNViewPropTypes,
BackAndroid as DeprecatedBackAndroid,
} from 'react-native';
import PropTypes from 'prop-types';

const ViewPropTypes = RNViewPropTypes || View.propTypes; // eslint-disable-line
const ViewPropTypes = { style: PropTypes.any };
const BackAndroid = BackHandler || DeprecatedBackAndroid;

export { ViewPropTypes, BackAndroid };

0 comments on commit 9d38942

Please sign in to comment.