diff --git a/src/index.jsx b/src/index.jsx index e49393f..fc1ef31 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -92,7 +92,6 @@ class LiquidFillGauge extends Component { }; static defaultProps = { - id: generate(), width: 400, height: 400, value: 0, @@ -258,7 +257,10 @@ class LiquidFillGauge extends Component { }); } render() { - const { style } = this.props; + const { + id = generate(), + style + } = this.props; const radius = Math.min(this.props.height / 2, this.props.width / 2); const fillCircleRadius = radius * (this.props.innerRadius - this.props.margin); const circle = arc() @@ -310,7 +312,7 @@ class LiquidFillGauge extends Component { transform={`translate(${cX},${cY})`} > - + { this.clipPath = c; @@ -333,12 +335,12 @@ class LiquidFillGauge extends Component { : {this.props.percent} } - + - + {gradientStops.map((stop, index) => { if (!React.isValidElement(stop)) { const key = stop.key || index;