Use prop-types package (#2029)

This commit is contained in:
Joe Haddad
2017-04-25 10:33:55 -04:00
committed by GitHub
parent 33a9700173
commit d65070edc4
18 changed files with 35 additions and 17 deletions

View File

@@ -6,6 +6,7 @@
"chai": "3.5.0",
"jsdom": "9.8.3",
"mocha": "3.2.0",
"prop-types": "15.5.6",
"test-integrity": "1.0.0"
}
}

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes, createElement } from 'react';
import React, { Component, createElement } from 'react';
import PropTypes from 'prop-types';
class BuiltEmitter extends Component {
static propTypes = {

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import load from 'absoluteLoad';
export default class extends Component {

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load() {
return [[1, '1'], [2, '2'], [3, '3'], [4, '4']];

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(users) {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
async function load() {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class extends Component {
static propTypes = {

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(prefix) {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
const styled = ([style]) =>
style

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(id = 0) {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
async function load() {
return {

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function* load(limit) {
let i = 1;

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load() {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(baseUser) {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load() {
return Promise.resolve([

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load({ id, ...rest } = { id: 0, user: { id: 42, name: '42' } }) {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load({ id = 0, ...rest }) {
return [

View File

@@ -7,7 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(name) {
return [