From fa6f5d1e3b452f01d47f8e31e704ddbf0a3e43a6 Mon Sep 17 00:00:00 2001 From: geobako Date: Fri, 7 May 2021 12:39:48 +0300 Subject: [PATCH] chore: Add props in readme --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 8a1a03e..34047f5 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,26 @@ import { CacheManager } from "@georstat/react-native-image-cache"; await CacheManager.clearCache(); ``` +## Props + +CachedImage accepts the following props: + +| Properties | PropType | Description | +| -------------------- | -------------------- | ------------------------------------------------------------------------------------------------------- | +| `cacheKey` | `String` | Defaults to source.uri | +| `imageAnimationDuration` | `Number` | Image animation duration when loading | +| `loadingImageComponent` | `React.Node` | Defaults to an image with the loadingSource prop | +| `loadingImageStyle` | `Object` | Style for loading image component. Works if you don't provide a loadingImageComponent | +| `loadingSource` | `object` | Source for loading Image component. Works if you don't provide loadingImageComponent | +| `onError` | `Func` | Runs when there is an error loading the image from cache | +| `resizeMode` | `String` | React native Image component resizeMode | +| `source` | `Object` | Image source . For example {uri:'https://...'} | +| `style` | `Object` | Image style | +| `thumbnailAnimationDuration` | `Number` | Animation duration for thumbnail | +| `thumbnailSource` | `Object` | Source of the thumbnail while loading the image | + + + ## Todo: - Convert library to React Hooks