mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
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:
committed by
GitHub
parent
29780821e8
commit
e055e6d2c2
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import { github } from 'react-syntax-highlighter/dist/styles';
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
@@ -10,11 +11,11 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
const propTypes = {
|
||||
sql: React.PropTypes.string.isRequired,
|
||||
rawSql: React.PropTypes.string,
|
||||
maxWidth: React.PropTypes.number,
|
||||
maxLines: React.PropTypes.number,
|
||||
shrink: React.PropTypes.bool,
|
||||
sql: PropTypes.string.isRequired,
|
||||
rawSql: PropTypes.string,
|
||||
maxWidth: PropTypes.number,
|
||||
maxLines: PropTypes.number,
|
||||
shrink: PropTypes.bool,
|
||||
};
|
||||
|
||||
class HighlightedSql extends React.Component {
|
||||
|
||||
Reference in New Issue
Block a user