mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Use prop-types library to silence PropTypes deprecation warning (#2498)
* Use prop-types library to fix the deprecation warning. * Updated weaveworks-ui-components version.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
class CloudFeature extends React.Component {
|
||||
@@ -21,14 +22,14 @@ class CloudFeature extends React.Component {
|
||||
}
|
||||
|
||||
CloudFeature.contextTypes = {
|
||||
store: React.PropTypes.object.isRequired,
|
||||
router: React.PropTypes.object,
|
||||
serviceStore: React.PropTypes.object
|
||||
store: PropTypes.object.isRequired,
|
||||
router: PropTypes.object,
|
||||
serviceStore: PropTypes.object
|
||||
};
|
||||
|
||||
CloudFeature.childContextTypes = {
|
||||
store: React.PropTypes.object,
|
||||
router: React.PropTypes.object
|
||||
store: PropTypes.object,
|
||||
router: PropTypes.object
|
||||
};
|
||||
|
||||
export default connect()(CloudFeature);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Forked from: https://github.com/KyleAMathews/react-sparkline at commit a9d7c5203d8f240938b9f2288287aaf0478df013
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { min as d3Min, max as d3Max, mean as d3Mean } from 'd3-array';
|
||||
import { isoParse as parseDate } from 'd3-time-format';
|
||||
import { line, curveLinear } from 'd3-shape';
|
||||
@@ -9,9 +10,9 @@ import { formatMetricSvg } from '../utils/string-utils';
|
||||
|
||||
|
||||
export default class Sparkline extends React.Component {
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
|
||||
this.x = scaleLinear();
|
||||
this.y = scaleLinear();
|
||||
this.line = line()
|
||||
@@ -96,7 +97,7 @@ export default class Sparkline extends React.Component {
|
||||
}
|
||||
|
||||
Sparkline.propTypes = {
|
||||
data: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||
data: PropTypes.arrayOf(PropTypes.object)
|
||||
};
|
||||
|
||||
Sparkline.defaultProps = {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"materialize-css": "0.98.1",
|
||||
"moment": "2.18.1",
|
||||
"page": "1.7.1",
|
||||
"prop-types": "^15.5.8",
|
||||
"react": "15.5.4",
|
||||
"react-addons-perf": "15.4.2",
|
||||
"react-dom": "15.5.4",
|
||||
@@ -41,9 +42,9 @@
|
||||
"reqwest": "2.0.5",
|
||||
"reselect": "3.0.0",
|
||||
"reselect-map": "1.0.1",
|
||||
"weaveworks-ui-components": "git+https://github.com/weaveworks/ui-components.git#v0.1.20",
|
||||
"whatwg-fetch": "2.0.3",
|
||||
"xterm": "2.5.0",
|
||||
"weaveworks-ui-components": "git+https://github.com/weaveworks/ui-components.git#v0.1.19"
|
||||
"xterm": "2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "6.7.7",
|
||||
|
||||
@@ -6088,9 +6088,9 @@ wd@^0.4.0:
|
||||
underscore.string "~3.0.3"
|
||||
vargs "~0.1.0"
|
||||
|
||||
"weaveworks-ui-components@git+https://github.com/weaveworks/ui-components.git#v0.1.19":
|
||||
version "0.1.19"
|
||||
resolved "git+https://github.com/weaveworks/ui-components.git#653b64bba230219756ff3b9b675d46e8a55e3e8f"
|
||||
"weaveworks-ui-components@git+https://github.com/weaveworks/ui-components.git#v0.1.20":
|
||||
version "0.1.20"
|
||||
resolved "git+https://github.com/weaveworks/ui-components.git#46e6165f39defe8a720b59a9db69c93514960e00"
|
||||
dependencies:
|
||||
babel-cli "^6.18.0"
|
||||
babel-plugin-transform-export-extensions "6.8.0"
|
||||
@@ -6098,6 +6098,7 @@ wd@^0.4.0:
|
||||
babel-preset-react "6.16.0"
|
||||
classnames "^2.2.5"
|
||||
node-sass "3.13.0"
|
||||
prop-types "^15.5.8"
|
||||
|
||||
webidl-conversions@^3.0.0:
|
||||
version "3.0.1"
|
||||
|
||||
Reference in New Issue
Block a user