Skip to content

Commit

Permalink
chore: Add props in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
geobako committed May 7, 2021
1 parent 4fcd6aa commit fa6f5d1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fa6f5d1

Please sign in to comment.