import React from 'react'; import PropTypes from 'prop-types'; import style from './ProgressCircle.sass'; const ProgressCircle = ({ children, min, max, progress, size, strokeWidth, backStroke, stroke, }) => { const width = size; const height = size; const extraWidth = width * 0.1; const extraHeight = height * 0.1; const viewBox = [ -extraWidth, -extraHeight, width + (2 * extraWidth), height + (2 * extraHeight), ].join(' '); const cx = width / 2; const cy = height / 2; const r = (size / 2) - (strokeWidth / 2); const strokeLength = 2 * Math.PI * r; const finalProgress = (progress - min) / (max - min); const strokeDasharray = strokeLength; const strokeDashoffset = strokeLength * (1 - finalProgress); const dropShadowDefId = 'dropshadow'; return (