fakiolinho/react-loading

Warning: Failed prop type: Invalid prop `width` of type `string` supplied to `Loading`, expected `number`.

dcgudeman opened this issue · 2 comments

After updating to 2.0.2 I am getting this warning:

Warning: Failed prop type: Invalid prop `width` of type `string` supplied to `Loading`, expected `number`.
		in Loading (at Loader.js:22)
		in Loader (at App.js:214)
		in div (at App.js:218)
		in App (created by Connect(App))
		in Connect(App) (at index.js:16)
		in Provider (at index.js:15)

I am currently using width={'20%'} height={'20%'} to size it relative to the containing div. It seems to still be working but it now displays warning. Is it possible to allow strings in addition to numbers for width and height specifically for this use case?

@dcgudeman you mean to change the propTypes or sth more?

@fakiolinho I opened a pull request (#53) that fixes the issue and adds a test to prevent regressions in the future. Let me know your thoughts.