KyleAMathews / react-spinkit

A collection of loading indicators animated with CSS for React
http://kyleamathews.github.io/react-spinkit/
MIT License
1.49k stars 73 forks source link

Timeout and color config, fix dimensions, pull in loaders.css, SSR, currentColor, spinnerName #58

Closed merrywhether closed 7 years ago

merrywhether commented 7 years ago

This PR addresses a few issues:

Additionally, updated tests, README, and demo site for all new features, and made changes to the test file to appease eslint (change to .jsx, convert tabs to spaces, etc) as well as organizational improvements (describe blocks to group related tests).

All changes were tested inside of a working app for functionality and proper centering alignment.

merrywhether commented 7 years ago

Second commit refactors everything to be classed-divs with anonymous children divs so that code can be DRYed, relying heavily on the suggestion in #27. This should make on-boarding future loader repos easier. Also makes it so that all spinners accept colorization. Additionally, fixed a bug in the CSS for the folding-cube.

Also does a similar thing for the demos page, using iteration to render all spinners (with colored versions too).

merrywhether commented 7 years ago

This also addresses #53 indirectly.

merrywhether commented 7 years ago

Since this represents a lot of changes, pulled in #19 as well, and maybe this could result in a 3.0 release.

KyleAMathews commented 7 years ago

This is awesome! Thanks for giving things a nice cleanup / upgrade! Adding colors support + loaders.css is 💯

Merging and releasing a 3.0.

The next frontier I see for this module is adding tree shaking support. That or perhaps switch to a lerna monorepo approach where there's a package per spinner to keep the size of the package to a minimum.