mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Ran PropTypes -> prop-types codemod against Libraries/FBReactKit/js/react-native-github
Reviewed By: acdlite Differential Revision: D4876709 fbshipit-source-id: 3a5e92bfc74287b7a9054546c438580bed0147af
This commit is contained in:
committed by
Facebook Github Bot
parent
8085ceca6a
commit
6564edce5e
@@ -24,6 +24,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
ActivityIndicator,
|
||||
@@ -46,7 +47,7 @@ var propTypes = {
|
||||
* values are 'Album', 'All', 'Event', 'Faces', 'Library', 'PhotoStream'
|
||||
* and SavedPhotos.
|
||||
*/
|
||||
groupTypes: React.PropTypes.oneOf([
|
||||
groupTypes: PropTypes.oneOf([
|
||||
'Album',
|
||||
'All',
|
||||
'Event',
|
||||
@@ -59,22 +60,22 @@ var propTypes = {
|
||||
/**
|
||||
* Number of images that will be fetched in one page.
|
||||
*/
|
||||
batchSize: React.PropTypes.number,
|
||||
batchSize: PropTypes.number,
|
||||
|
||||
/**
|
||||
* A function that takes a single image as a parameter and renders it.
|
||||
*/
|
||||
renderImage: React.PropTypes.func,
|
||||
renderImage: PropTypes.func,
|
||||
|
||||
/**
|
||||
* imagesPerRow: Number of images to be shown in each row.
|
||||
*/
|
||||
imagesPerRow: React.PropTypes.number,
|
||||
imagesPerRow: PropTypes.number,
|
||||
|
||||
/**
|
||||
* The asset type, one of 'Photos', 'Videos' or 'All'
|
||||
*/
|
||||
assetType: React.PropTypes.oneOf([
|
||||
assetType: PropTypes.oneOf([
|
||||
'Photos',
|
||||
'Videos',
|
||||
'All',
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var PropTypes = require('prop-types');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
Linking,
|
||||
@@ -34,7 +35,7 @@ var UIExplorerBlock = require('./UIExplorerBlock');
|
||||
|
||||
class OpenURLButton extends React.Component {
|
||||
static propTypes = {
|
||||
url: React.PropTypes.string,
|
||||
url: PropTypes.string,
|
||||
};
|
||||
|
||||
handleClick = () => {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var PropTypes = require('prop-types');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
StyleSheet,
|
||||
@@ -38,8 +39,8 @@ class UIExplorerBlock extends React.Component {
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
title: React.PropTypes.string,
|
||||
description: React.PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
description: PropTypes.string,
|
||||
};
|
||||
|
||||
state = {description: (null: ?string)};
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var PropTypes = require('prop-types');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
StyleSheet,
|
||||
@@ -35,7 +36,7 @@ class UIExplorerButton extends React.Component {
|
||||
props: {onPress?: Function};
|
||||
|
||||
static propTypes = {
|
||||
onPress: React.PropTypes.func,
|
||||
onPress: PropTypes.func,
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var PropTypes = require('prop-types');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
ScrollView,
|
||||
@@ -40,8 +41,8 @@ class UIExplorerPage extends React.Component {
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
noScroll: React.PropTypes.bool,
|
||||
noSpacer: React.PropTypes.bool,
|
||||
noScroll: PropTypes.bool,
|
||||
noSpacer: PropTypes.bool,
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user