Fixing PropTypes warning messages (#2670)

* Fixing PropTypes warning message

React recently started warning on the upcoming deprecation of
React.PropTypes, the new approach is to use the `prop-types`
npm package instead.

* Fixing the tests
This commit is contained in:
Maxime Beauchemin
2017-04-24 17:39:57 -07:00
committed by GitHub
parent 29780821e8
commit e055e6d2c2
67 changed files with 218 additions and 152 deletions

View File

@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Col,
FormGroup,
@@ -23,15 +24,15 @@ import { STATE_BSSTYLE_MAP } from '../constants';
import RunQueryActionButton from './RunQueryActionButton';
const propTypes = {
actions: React.PropTypes.object.isRequired,
height: React.PropTypes.string.isRequired,
database: React.PropTypes.object,
latestQuery: React.PropTypes.object,
tables: React.PropTypes.array.isRequired,
editorQueries: React.PropTypes.array.isRequired,
dataPreviewQueries: React.PropTypes.array.isRequired,
queryEditor: React.PropTypes.object.isRequired,
hideLeftBar: React.PropTypes.bool,
actions: PropTypes.object.isRequired,
height: PropTypes.string.isRequired,
database: PropTypes.object,
latestQuery: PropTypes.object,
tables: PropTypes.array.isRequired,
editorQueries: PropTypes.array.isRequired,
dataPreviewQueries: PropTypes.array.isRequired,
queryEditor: PropTypes.object.isRequired,
hideLeftBar: PropTypes.bool,
};
const defaultProps = {