Skip to content

Commit dc2c2ec

Browse files
alphaspmastermoo
authored andcommitted
Migrate deprecated React.PropTypes (#195)
* added gitignore * migrate deprecated React.propTypes
1 parent f3b897a commit dc2c2ec

File tree

4 files changed

+52
-7
lines changed

4 files changed

+52
-7
lines changed

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history
38+
39+
40+
.idea

ActionButton.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from "react";
1+
import React, { Component } from "react";
2+
import PropTypes from "prop-types";
23
import {
34
StyleSheet,
45
Text,
@@ -334,10 +335,10 @@ ActionButton.propTypes = {
334335
zIndex: PropTypes.number,
335336

336337
hideShadow: PropTypes.bool,
337-
shadowStyle: React.PropTypes.oneOfType([
338-
React.PropTypes.object,
339-
React.PropTypes.array,
340-
React.PropTypes.number
338+
shadowStyle: PropTypes.oneOfType([
339+
PropTypes.object,
340+
PropTypes.array,
341+
PropTypes.number
341342
]),
342343

343344
bgColor: PropTypes.string,

ActionButtonItem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from "react";
1+
import React, { Component } from "react";
2+
import PropTypes from "prop-types";
23
import {
34
StyleSheet,
45
Text,

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@
2424
"bugs": {
2525
"url": "https://github.com/mastermoo/react-native-action-button/issues"
2626
},
27-
"homepage": "https://github.com/mastermoo/react-native-action-button"
27+
"homepage": "https://github.com/mastermoo/react-native-action-button",
28+
"dependencies": {
29+
"prop-types": "^15.5.10"
30+
}
2831
}

0 commit comments

Comments
 (0)