adexin / spinners-react

Lightweight SVG/CSS spinners for React
https://adexin.github.io/spinners/
MIT License
408 stars 20 forks source link

Size doesn't exist on SpinnerCircularFixed #24

Closed mattfelten closed 1 month ago

mattfelten commented 5 months ago

<SpinnerCircularFixed size={32} /> has a type error that size doesn't exist. It does seem to work though.

Amit-K-007 commented 1 month ago

@mattfelten <SpinnerCircularFixed size={32} /> is working correctly. There is no any type error.

mattfelten commented 1 month ago

spinners-react@1.0.7

CleanShot 2024-08-12 at 11 17 11

Type '{ size: number; thickness: number; speed: number; color: string; secondaryColor: "rgba(0, 0, 0, 0.44)"; className: string; "client:load": true; }' is not assignable to type 'IntrinsicAttributes & HTMLAttributes & Partial<{ speed: number; still: boolean; thickness: number; }> & Partial<...>'. Property 'size' does not exist on type 'IntrinsicAttributes & HTMLAttributes & Partial<{ speed: number; still: boolean; thickness: number; }> & Partial<...>'.ts(2322)

I'll try to create a working demo.

Amit-K-007 commented 1 month ago

image I tried using the same component as you, and it worked properly for me. It might help to try reinstalling the library, as this could resolve the error.

mattfelten commented 1 month ago

Really odd. You're right. I can't replicate it on CodeSandbox. https://codesandbox.io/p/sandbox/test-react-spinners-zf2nph

I did reinstall all my dependencies but didn't change anything. I'll keep digging but seems like the library is fine. Must be on my end somewhere.