Skip to content

Commit

Permalink
Rename project to lottie-react-web (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
felippenardi authored Jul 29, 2018
1 parent 56f7284 commit 7743d39
Show file tree
Hide file tree
Showing 5 changed files with 991 additions and 130 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

<a name="1.2.4"></a>
## [1.2.4](https://github.com/felippenardi/lottie-react-web/compare/v1.2.3...v1.2.4) (2018-07-29)



<a name="1.2.3"></a>
## [1.2.3](https://github.com/chenqingspring/react-lottie/compare/v1.2.2...v1.2.3) (2018-06-14)

Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Lottie Animation View for React ([Angular](https://github.com/chenqingspring/ng-lottie), [Vue](https://github.com/chenqingspring/vue-lottie))

[![npm version](https://badge.fury.io/js/react-lottie.svg)](http://badge.fury.io/js/react-lottie)

## Demo
https://chenqingspring.github.io/react-lottie
[![npm version](https://badge.fury.io/js/lottie-react-web.svg)](http://badge.fury.io/js/lottie-react-web)

## Wapper of bodymovin.js

Expand All @@ -28,7 +25,7 @@ Looking for lottie files › https://www.lottiefiles.com/

Install through npm:
```
npm install --save react-lottie
npm install --save lottie-react-web
```

## Usage
Expand All @@ -37,7 +34,7 @@ Import pinjump.json.json as animation data

```jsx
import React from 'react'
import Lottie from 'react-lottie';
import Lottie from 'lottie-react-web';
import * as animationData from './pinjump.json'

export default class LottieControl extends React.Component {
Expand All @@ -55,7 +52,7 @@ export default class LottieControl extends React.Component {

const defaultOptions = {
loop: true,
autoplay: true,
autoplay: true,
animationData: animationData,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
Expand Down Expand Up @@ -90,7 +87,7 @@ the object representing the animation settings that will be instantiated by body
>
>**animationData** *required*
>
>**rendererSettings** *required*
>**rendererSettings** *required*
**width** *optional* [default: `100%`]

Expand All @@ -117,8 +114,6 @@ eventListeners=[
## Related Projects

* [Bodymovin](https://github.com/bodymovin/bodymovin) react-lottie is a wrapper of bodymovin
* [Angular Lottie](https://github.com/chenqingspring/ng-lottie) angular implementation
* [Vue Lottie](https://github.com/chenqingspring/vue-lottie) vue implementation
* [React Native Lottie](https://github.com/airbnb/lottie-react-native) react native implementation by airbnb
* [IOS Lottie](https://github.com/airbnb/lottie-ios) ios implementation by airbnb
* [Android Lottie](https://github.com/airbnb/lottie-android) android implementation by airbnb
Expand All @@ -128,4 +123,3 @@ Your contributions and suggestions are heartily welcome.

## License
MIT

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "react-lottie",
"version": "1.2.3",
"description": "lottie animation view for React",
"name": "lottie-react-web",
"version": "1.2.4",
"description": "Lottie wrapper for React on the web.",
"repository": {
"type": "git",
"url": "https://github.com/chenqingspring/react-lottie"
"url": "https://github.com/felippenardi/lottie-react-web"
},
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -50,7 +50,7 @@
},
"dependencies": {
"babel-runtime": "^6.26.0",
"lottie-web": "^5.1.3"
"lottie-web": "^5.2.0"
},
"main": "dist/index.js",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class Lottie extends React.Component {
if (this.options.animationData !== nextProps.options.animationData) {
this.deRegisterEvents(this.props.eventListeners);
this.destroy();
this.options = {...this.options, ...nextProps.options};
this.options = { ...this.options, ...nextProps.options };
this.anim = lottie.loadAnimation(this.options);
this.registerEvents(nextProps.eventListeners);
}
Expand Down
Loading

0 comments on commit 7743d39

Please sign in to comment.