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>