Fix some warnings.

This commit is contained in:
Filip Barl
2017-11-14 17:26:57 +01:00
parent 848c9bab3c
commit 2df38731a6
4 changed files with 6 additions and 6 deletions

View File

@@ -105,7 +105,7 @@ export default class Sparkline extends React.Component {
? this.props.hoverColor
: this.props.strokeColor;
const strokeWidth = this.props.strokeWidth * (this.props.hovered ? HOVER_STROKE_MULTIPLY : 1);
const strokeDasharray = hasData || `${dash}, ${dash}`;
const strokeDasharray = hasData ? undefined : `${dash}, ${dash}`;
const radius = this.props.circleRadius * (this.props.hovered ? HOVER_RADIUS_MULTIPLY : 1);
const fillOpacity = this.props.hovered ? 1 : 0.6;
const circleColor = hasData && this.props.hovered ? strokeColor : strokeColor;

View File

@@ -42,7 +42,7 @@ class ViewModeSelector extends React.Component {
<div
className={className}
disabled={!isEnabled}
onClick={isEnabled && onClick}
onClick={isEnabled ? onClick : undefined}
title={`View ${label.toLowerCase()}`}>
<span className={icons} style={{ fontSize: 12 }} />
<span className="label">{label}</span>

View File

@@ -43,7 +43,7 @@
"reselect": "3.0.1",
"reselect-map": "1.0.3",
"styled-components": "^2.2.1",
"weaveworks-ui-components": "git+https://github.com/weaveworks/ui-components.git#v0.2.0",
"weaveworks-ui-components": "git+https://github.com/weaveworks/ui-components.git#v0.2.1",
"whatwg-fetch": "2.0.3",
"xterm": "2.9.2"
},

View File

@@ -6487,9 +6487,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.2.0":
version "0.2.0"
resolved "git+https://github.com/weaveworks/ui-components.git#b39494abf98d8c4226d885370129870344027e59"
"weaveworks-ui-components@git+https://github.com/weaveworks/ui-components.git#v0.2.1":
version "0.2.1"
resolved "git+https://github.com/weaveworks/ui-components.git#32aeac77d7847e0d342f47aab229073bd729a383"
dependencies:
babel-cli "^6.18.0"
babel-plugin-transform-export-extensions "6.8.0"