geist-org / geist-ui

A design system for building modern websites and applications.
https://geist-ui.dev
MIT License
4.35k stars 335 forks source link

loading's `width` & `height` props seem vain #488

Closed Deep-Codes closed 3 years ago

Deep-Codes commented 3 years ago

Bug report 🐞

I would create a PR for it.

Version & Environment

Expection

In the file : Loading.tsx

There are width and height props being passed but they don't seem to be used anywhere, furthermore width & height are calculated based on the size props which decided the actual size of the Loading Component.

Also, height prop seems vain as width and height should be the same for appropriate proportions.

Expected should be width & height props should override the " Calculated Size "

Expected Result :

Screenshot 2021-03-23 at 9 06 42 PM

Actual results (or Errors)

Screenshot 2021-03-23 at 9 07 40 PM

Also in tests it seems to add default size even with passing custom props

https://github.com/geist-org/react/blob/502da720f163a7dc5b171fcbb7c2f3098939013b/components/loading/__tests__/index.test.tsx#L38

Snapshots:

https://github.com/geist-org/react/blob/502da720f163a7dc5b171fcbb7c2f3098939013b/components/loading/__tests__/__snapshots__/index.test.tsx.snap#L108

https://github.com/geist-org/react/blob/502da720f163a7dc5b171fcbb7c2f3098939013b/components/loading/__tests__/__snapshots__/index.test.tsx.snap#L173

Deep-Codes commented 3 years ago

Ignore these commits it was just me trying out stuff extremely sorry.