diff --git a/lib/react-loading.jsx b/lib/react-loading.jsx index 221826c..009eb3c 100644 --- a/lib/react-loading.jsx +++ b/lib/react-loading.jsx @@ -16,6 +16,7 @@ export default class Loading extends Component { PropTypes.string, PropTypes.number, ]), + style: PropTypes.shape(), }; static defaultProps = { @@ -24,6 +25,7 @@ export default class Loading extends Component { type: 'balls', height: 64, width: 64, + style: {}, }; state = { @@ -53,19 +55,19 @@ export default class Loading extends Component { render() { const { - color, delay, type, height, width, ...restProps + color, delay, type, height, width, style, ...restProps } = this.props; const selectedType = this.state.delayed ? 'blank' : type; const svg = svgSources[selectedType]; - const style = { - fill: color, - height, - width, - }; return (