stanleyxu2005 / react-checkmark

Animated checkmark for React
Apache License 2.0
29 stars 5 forks source link

Warning: Failed prop type: c: prop type `size` is invalid; #4

Closed boyuanx closed 3 years ago

boyuanx commented 4 years ago

When using Checkmark as: <Checkmark size="xxLarge" /> or <Checkmark size={96} />

I get the following error:

Warning: Failed prop type: c: prop type `size` is invalid; it must be a function, usually from the `prop-types` package, but received `number`.
stanleyxu2005 commented 4 years ago

Hi @boyuanx. Thank you for the feedback. Expectedly the fix https://github.com/stanleyxu2005/react-checkmark/commit/7c051bbc3bf6e5a0251d4160cc38e8ab4f35cf7a can remove the annoying warning. Please upgrade to v1.3.0.

boyuanx commented 4 years ago

@stanleyxu2005 I am still getting the same error in v1.3.0 unfortunately.

ghost commented 4 years ago

same with me still getting error already update to v1.3.0

stanleyxu2005 commented 4 years ago

Create you @conioX @boyuanx give an example on Codepen that I can test with?

charan1973 commented 3 years ago

Here's a code sandbox link - https://codesandbox.io/s/musing-buck-hr4b4?file=/src/App.js Check the console once you're there.

stanleyxu2005 commented 3 years ago

I acknowledged this issue. In v1.4.0, you need to change number size to string size. For example size={192} now needs to be size='192px'. This solves the problem. @boyuanx @charan1973 @ghost

charan1973 commented 3 years ago

I acknowledged this issue. In v1.4.0, you need to change number size to string size. For example size={192} now needs to be size='192px'. This solves the problem. @boyuanx @charan1973 @ghost

I'll use the string size. Thank you for the fix.