0.1.1 • Published 1 year ago

@julienqueffelec/react-native-cache-image v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-cache-image

Smart React-Native component which cache image on the device when loaded

Installation

npm install react-native-cache-image

How to show image in a markdown file

How it works

Demo

Usage

import { CacheImage } from '@julienqueffelec/react-native-cache-image';

<CacheImage source={{ uri: 'https://picsum.photos/200/300' }} />;

Props

PropTypeDefaultDescription
sourceImageSourcePropType''The source of the image
resizeModeImageResizeModecoverThe resize mode of the image
defaultImageImageSourcePropTypeThe default image to show when the source is not loaded
defaultImageResizeModeImageResizeModeundefinedThe resize mode of the default image
defaultImageStyleStyleProp<ImageStyle>undefinedThe style of the default image
imageStyleStyleProp<ImageStyle>undefinedThe style of the image
errorImageImageSourcePropTypeThe image to show when the source is not loaded
errorImageStyleStyleProp<ImageStyle>undefinedThe style of the error image
styleStyleProp<ImageStyle>undefinedThe style of the image container
containerStyleStyleProp<ViewStyle>undefinedThe style of the image container

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.1.1

1 year ago

0.1.0

1 year ago