davidhu2000 / react-spinners

A collection of loading spinner components for react
https://www.davidhu.io/react-spinners
MIT License
3k stars 260 forks source link

Type error #588

Closed NielsHamelink-web closed 2 months ago

NielsHamelink-web commented 2 months ago

Package Version: 0.13.8

Property 'size' does not exist on type 'IntrinsicAttributes & LoaderHeightWidthProps'.

  69 |                                     color="rgb(22 143 255)"
  70 |                                     loading={loading}
> 71 |                                     size={20}
     |                                     ^
  72 |                                     aria-label="Loading Spinner"
  73 |                                     data-testid="loader"
  74 |                                 />
<BarLoader
    color="rgb(22 143 255)"
    loading={loading}
    size={20}
    aria-label="Loading Spinner"
    data-testid="loader"
/>

The attribute size doesn't exist in the typing of <BarLoader />.

davidhu2000 commented 2 months ago

@NielsHamelink-web, this is expected, as BarLoader needs a height & width prop instead of a single size prop