davidhu2000 / react-spinners

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

PuffLoader has zero size #529

Closed sgehrman closed 2 years ago

sgehrman commented 2 years ago

I'm on .12 but I think the latest has the same issue.

<PuffLoader size={45} color="#ccc" />

The spinner is wrapped in a span and has zero height/width and draws outside it's bounds. If I change the span to a div it works.

davidhu2000 commented 2 years ago

https://github.com/davidhu2000/react-spinners/blob/c54d1a5f93429c7c921710801d06de0b9a5cf446/src/PuffLoader.tsx#L20-L21

the display property inherits from the parent, so if you wrap this in a span, it'll act like the span.

I don't think this is a real issue as this is by design.