Releases: davidhu2000/react-spinners
Releases · davidhu2000/react-spinners
Simplify API by removing unit props
The component API has been simplified. The length prop can now accept number or string.
Major Changes
- all unit props are deprecated, including
sizeUnit
,heightUnit
,widthUnit
, andradiusUnit
. Thesize
,height
,width
, andradius
props now acceptsnumber
andstring
.- If value is number, default to
px
- If value is string with valid css unit, return the input value
- If value is string with invalid css unit, output warning console log and default to
px
- If value is number, default to
margin
prop now works the same way as other length props. Can acceptnumber
andstring
Minor Changes
css
prop default is now""
. No functionality change here.- fix margin prop functionality on
FadeLoader
andRotateLoader
so it actually expands the spacing between the elements. - update the README
color
prop section to include a list of available color words accepted. - clean up README formatting using the prettier plugin
- add
yarn
installation instruction to the README.
Rewrite Package in TypeScript
The entire package has been rewritten in TypeScript. The package will now support individual loader imports with types.
Major changes:
- Add support for types for individual loader imports
- Add support for using the basic color name as props instead of only color hashes
- Reduced total package size from around 850kb to 135gb
- Fix
main
key value inpackage.json
to point to the correctindex.js
- Removed
prop-types
andrecompose
from dependencies - Added tests to get to 100% code coverage
Minor changes:
- Update
PacmanLoader
css top property to respectsizeUnit
prop. - Update README to include
radius
andradiusUnit
. - Add missing
transform
key to theRiseLoader
animation. - Setup
tslint
andprettier
to enforce code consistency. - Add missing
"
to.babelrc
in README.
Emotion upgrade and optimizations
- Update emotion package to emotion 10, this includes a breaking change with replacing
className
prop withcss
prop to match convention of the Emotion package. - update package.json to include wider range of version for recompose
- update how
onlyUpdateForKeys
is imported fromrecompose
. Reduced import cost from 26kb to 19kb.
More customization with className prop and single load import
- add
className
prop to allow more customization usingemotion
module. - removed
loaderStyle
prop in favor of the newclassName
prop. - add functionality to import a single loader without importing the whole package.
- readme updates to include all props and new changes
Add loaderStyle prop for more customization
- added new prop
loaderStyle
to allow more customization for each loader.
For example,
<Barloader loaderStyle={{ opacity: 0.7 }} />
Rendering fix due to breaking changes in `emotion
Emotion 8 deprecated the composes
key in the css method. This causes several loaders to not render properly. Fixed the rendering issue for all the loaders on this release.
Minor: Add unit props to loaders
- added unit props to loaders to allow different css units such as
%
. - fixed some string concatenation errors in several loaders that prevented correct rendering.
Patch: update devDependencies and peerDependencies versions
- updated outdated devDependencies
- removed unused npm scripts from
package.json
- added
v16
forreact
andreact-dom
peerDependencies - minor linting fixes after upgrading devDependencies version
Patch: fix typo in emotion css
- bugfix: change
borderRadius
toborder-radius
inRingLoader
so the browser will recognize the css.
Patch: Dependency Bug Fix
- moved
prop-types
to dependencies to fixPackage Not Found
Error. - added typings file for TypeScript support.