From f79705bf42607c4d4524df56f1436926fcbd555b Mon Sep 17 00:00:00 2001 From: IdealSystemsMCP <35523248+IdealSystemsMCP@users.noreply.github.com> Date: Fri, 24 Jan 2020 13:26:00 +0100 Subject: [PATCH 1/5] Add custom styles --- lib/react-loading.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/react-loading.jsx b/lib/react-loading.jsx index 221826c..df037b2 100644 --- a/lib/react-loading.jsx +++ b/lib/react-loading.jsx @@ -53,19 +53,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 (
From ca2e1d3d47622e7d6e109f665fbde1013b0cd5c6 Mon Sep 17 00:00:00 2001 From: IdealSystemsMCP <35523248+IdealSystemsMCP@users.noreply.github.com> Date: Tue, 28 Jan 2020 11:20:04 +0100 Subject: [PATCH 2/5] 'style' is missing in props validation --- lib/react-loading.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/react-loading.jsx b/lib/react-loading.jsx index df037b2..96440cf 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.object, }; static defaultProps = { @@ -24,6 +25,7 @@ export default class Loading extends Component { type: 'balls', height: 64, width: 64, + style: {}, }; state = { From 59902c3618f30d884e0b83818f91a7d8aeb31d9d Mon Sep 17 00:00:00 2001 From: IdealSystemsMCP <35523248+IdealSystemsMCP@users.noreply.github.com> Date: Tue, 28 Jan 2020 14:13:52 +0100 Subject: [PATCH 3/5] Update react-loading.jsx --- lib/react-loading.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/react-loading.jsx b/lib/react-loading.jsx index 96440cf..db682ed 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, ]), + // eslint-disable-next-line forbid-prop-types style: PropTypes.object, }; From 02d5a8efd4ca4d4d5651b925db4bc3bb6dc868ea Mon Sep 17 00:00:00 2001 From: IdealSystemsMCP <35523248+IdealSystemsMCP@users.noreply.github.com> Date: Tue, 28 Jan 2020 14:36:38 +0100 Subject: [PATCH 4/5] Update react-loading.jsx --- lib/react-loading.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/react-loading.jsx b/lib/react-loading.jsx index db682ed..a132155 100644 --- a/lib/react-loading.jsx +++ b/lib/react-loading.jsx @@ -16,7 +16,7 @@ export default class Loading extends Component { PropTypes.string, PropTypes.number, ]), - // eslint-disable-next-line forbid-prop-types + // eslint-disable-next-line react/forbid-prop-types style: PropTypes.object, }; From 3c49dbeeeec87bd00ea4b10fb7316931caa66086 Mon Sep 17 00:00:00 2001 From: IdealSystemsMCP <35523248+IdealSystemsMCP@users.noreply.github.com> Date: Tue, 28 Jan 2020 14:43:47 +0100 Subject: [PATCH 5/5] Update react-loading.jsx --- lib/react-loading.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/react-loading.jsx b/lib/react-loading.jsx index a132155..009eb3c 100644 --- a/lib/react-loading.jsx +++ b/lib/react-loading.jsx @@ -16,8 +16,7 @@ export default class Loading extends Component { PropTypes.string, PropTypes.number, ]), - // eslint-disable-next-line react/forbid-prop-types - style: PropTypes.object, + style: PropTypes.shape(), }; static defaultProps = {