From 67f28eda6c1ea84bda7e49b5dd2124cb67bd1fe5 Mon Sep 17 00:00:00 2001 From: Alex P Date: Thu, 16 Nov 2017 10:53:47 -0800 Subject: [PATCH] Render dimensions of gauge from props --- ui/src/shared/components/Gauge.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/src/shared/components/Gauge.js b/ui/src/shared/components/Gauge.js index abe5dd32e..faeb09afc 100644 --- a/ui/src/shared/components/Gauge.js +++ b/ui/src/shared/components/Gauge.js @@ -265,21 +265,23 @@ class Gauge extends Component { } render() { + const {width, height} = this.props return ( (this.canvasRef = r)} /> ) } } -const {number} = PropTypes +const {number, string} = PropTypes Gauge.propTypes = { + width: string.isRequired, + height: string.isRequired, minValue: number.isRequired, maxValue: number.isRequired, lowerThreshold: number.isRequired,