From 3f8da116cb9646a93cc333c357276419e7bbf12e Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Mon, 18 Sep 2017 18:03:37 -0500 Subject: [PATCH] fix(index): support classes prop --- src/index.jsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index 4702bfd..e0726ea 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -74,14 +74,14 @@ class CircularProgressbar extends React.Component { } render() { - const { percentage, textForPercentage, className, strokeWidth } = this.props; + const { percentage, textForPercentage, className, classes, strokeWidth } = this.props; const classForPercentage = this.props.classForPercentage ? this.props.classForPercentage(percentage) : ''; const pathDescription = this.getPathDescription(); const text = textForPercentage ? textForPercentage(percentage) : null; return ( { @@ -96,14 +96,14 @@ class CircularProgressbar extends React.Component { } @@ -129,6 +129,7 @@ class CircularProgressbar extends React.Component { CircularProgressbar.propTypes = { percentage: PropTypes.number.isRequired, className: PropTypes.string, + classes: PropTypes.object, strokeWidth: PropTypes.number, background: PropTypes.bool, backgroundPadding: PropTypes.number, @@ -140,6 +141,12 @@ CircularProgressbar.propTypes = { CircularProgressbar.defaultProps = { strokeWidth: 8, className: '', + classes: { + root: 'CircularProgressbar', + trail: 'CircularProgressbar-trail', + path: 'CircularProgressbar-path', + text: 'CircularProgressbar-text', + }, background: false, backgroundPadding: null, initialAnimation: false,