From c12bb1eb084aaba480c5f24b3a9f31e4bf8b113e Mon Sep 17 00:00:00 2001 From: Marvin Frachet Date: Sat, 27 Apr 2019 11:35:10 -0400 Subject: [PATCH] fixing animations --- README.md | 2 +- docs/ANIMATIONS.md | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2b70dce..636b770 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Fully compatible with [Expo](https://expo.io/) and [react-native-web](https://gi - How to use it ? - [Components available](./docs/COMPONENTS.md) - [Using default animations](./docs/ANIMATIONS.md#default) -- [Using a custom animation](./ANIMATIONS.md#custom) +- [Using a custom animation](./docs/ANIMATIONS.md#custom-animations)

Usage

diff --git a/docs/ANIMATIONS.md b/docs/ANIMATIONS.md index 9713b51..ad87a0a 100644 --- a/docs/ANIMATIONS.md +++ b/docs/ANIMATIONS.md @@ -2,17 +2,26 @@ ## Default animations -The project comes with some default animations located in [src/animation](./src/animation). It simply animates the placeholder with visual effects while waiting the real content to appear. +There are two built-in animations inside this library `shine` and `fade`. They can be used by passing them inside the `animation` prop: -Adding an animation is possible using the [React Native Animated](https://facebook.github.io/react-native/docs/animations.html) component. - -You can contribute by creating your own placeholder animations and submitting a pull request. +```javascript + + + + + + +``` ## Custom animations It's also possible to create custom animations using the `customAnimation` props of the `Placeholder` component: -```jsx +```javascript