mirror of
https://github.com/zhigang1992/react-native-vector-icons.git
synced 2026-01-12 17:42:58 +08:00
Replace React.PropTypes with prop-types (#458)
This commit is contained in:
committed by
Joel Arvidsson
parent
cd40017a29
commit
d9418da28f
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
||||
import Foundation from 'react-native-vector-icons/Foundation';
|
||||
import Ionicons from 'react-native-vector-icons/Ionicons';
|
||||
@@ -19,9 +20,9 @@ const ICON_SET_MAP = {
|
||||
// react-native-icons module. Please don't use this component for new apps/views.
|
||||
export default class Icon extends React.Component {
|
||||
static propTypes = {
|
||||
name: React.PropTypes.string.isRequired,
|
||||
size: React.PropTypes.number,
|
||||
color: React.PropTypes.string,
|
||||
name: PropTypes.string.isRequired,
|
||||
size: PropTypes.number,
|
||||
color: PropTypes.string,
|
||||
};
|
||||
|
||||
setNativeProps(nativeProps) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import './App.css';
|
||||
import Entypo from '../../glyphmaps/Entypo.json';
|
||||
import EvilIcons from '../../glyphmaps/EvilIcons.json';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes,
|
||||
} from 'react';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
NativeModules,
|
||||
Platform,
|
||||
|
||||
@@ -4,9 +4,10 @@ import pick from 'lodash/pick';
|
||||
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes,
|
||||
} from 'react';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
|
||||
@@ -3,9 +3,10 @@ import pick from 'lodash/pick';
|
||||
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes,
|
||||
} from 'react';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
TabBarIOS,
|
||||
} from './react-native';
|
||||
|
||||
@@ -3,9 +3,10 @@ import pick from 'lodash/pick';
|
||||
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes,
|
||||
} from 'react';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
ToolbarAndroid,
|
||||
} from './react-native';
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^4.0.0",
|
||||
"prop-types": "^15.5.8",
|
||||
"yargs": "^6.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user