From 68c0836a50ecfbd81a8c36357acc2e79ae7d9364 Mon Sep 17 00:00:00 2001 From: Louis Lagrange Date: Wed, 11 Oct 2017 15:32:34 +0200 Subject: [PATCH 1/2] Add backgroundWidth prop --- src/CircularProgress.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CircularProgress.js b/src/CircularProgress.js index 982365f..4a5f2b9 100644 --- a/src/CircularProgress.js +++ b/src/CircularProgress.js @@ -25,7 +25,7 @@ export default class CircularProgress extends React.Component { } render() { - const { size, width, tintColor, backgroundColor, style, rotation, linecap, children } = this.props; + const { size, width, backgroundWidth, tintColor, backgroundColor, style, rotation, linecap, children } = this.props; const backgroundPath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, 360 * .9999); const fill = this.extractFill(this.props.fill); @@ -39,7 +39,7 @@ export default class CircularProgress extends React.Component { + strokeWidth={backgroundWidth != null ? backgroundWidth : width}/> Date: Wed, 11 Oct 2017 15:39:11 +0200 Subject: [PATCH 2/2] Update README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a04e7bb..f51cdf7 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ this.refs.circularProgress.performLinearAnimation(100, 8000); // Will fill the p You can configure the passing by following props: - **size** – width and height of the circle -- **width** - thickness of the line +- **width** - thickness of the lines +- **backgroundWidth** - thickness of the background line - **fill** - current, percentage fill (from 0 to 100) - **prefill** - percentage fill before the animation (from 0 to 100) - **tintColor** - color of a progress line