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

removed prop types - react native 0.62.0 compatibility #236

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"prop-types": "^15.5.9",
"react-native-material-buttons": "^0.5.0",
"react-native-material-ripple": "^0.8.0",
"react-native-material-textfield": "^0.12.0"
"react-native-material-textfield": "git+https://github.com/javarahulsharma/react-native-material-textfield.git"
}
}
79 changes: 0 additions & 79 deletions src/components/dropdown/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import {
Text,
Expand All @@ -9,7 +8,6 @@ import {
TouchableWithoutFeedback,
Dimensions,
Platform,
ViewPropTypes,
I18nManager,
} from 'react-native';
import Ripple from 'react-native-material-ripple';
Expand Down Expand Up @@ -78,83 +76,6 @@ export default class Dropdown extends PureComponent {
useNativeDriver: false,
};

static propTypes = {
...TouchableWithoutFeedback.propTypes,

disabled: PropTypes.bool,

value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),

data: PropTypes.arrayOf(PropTypes.object),

valueExtractor: PropTypes.func,
labelExtractor: PropTypes.func,
propsExtractor: PropTypes.func,

absoluteRTLLayout: PropTypes.bool,

dropdownOffset: PropTypes.shape({
top: PropTypes.number.isRequired,
left: PropTypes.number.isRequired,
}),

dropdownMargins: PropTypes.shape({
min: PropTypes.number.isRequired,
max: PropTypes.number.isRequired,
}),

dropdownPosition: PropTypes.number,

rippleColor: PropTypes.string,
rippleCentered: PropTypes.bool,
rippleSequential: PropTypes.bool,

rippleInsets: PropTypes.shape({
top: PropTypes.number,
right: PropTypes.number,
bottom: PropTypes.number,
left: PropTypes.number,
}),

rippleOpacity: PropTypes.number,
shadeOpacity: PropTypes.number,

rippleDuration: PropTypes.number,
animationDuration: PropTypes.number,

fontSize: PropTypes.number,

textColor: PropTypes.string,
itemColor: PropTypes.string,
selectedItemColor: PropTypes.string,
disabledItemColor: PropTypes.string,
baseColor: PropTypes.string,

itemTextStyle: Text.propTypes.style,

itemCount: PropTypes.number,
itemPadding: PropTypes.number,

onLayout: PropTypes.func,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
onChangeText: PropTypes.func,

renderBase: PropTypes.func,
renderAccessory: PropTypes.func,

containerStyle: (ViewPropTypes || View.propTypes).style,
overlayStyle: (ViewPropTypes || View.propTypes).style,
pickerStyle: (ViewPropTypes || View.propTypes).style,

supportedOrientations: PropTypes.arrayOf(PropTypes.string),

useNativeDriver: PropTypes.bool,
};

constructor(props) {
super(props);

Expand Down
7 changes: 0 additions & 7 deletions src/components/item/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { Button } from 'react-native-material-buttons';

Expand All @@ -12,12 +11,6 @@ export default class DropdownItem extends PureComponent {
shadeBorderRadius: 0,
};

static propTypes = {
...Button.propTypes,

index: PropTypes.number.isRequired,
};

constructor(props) {
super(props);

Expand Down