Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unpourtous/react-native-image-indicator

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unpourtous/react-native-image-indicator - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

8

CustomImage.js

@@ -112,7 +112,7 @@ /**

let source = null
if (props.source) {
if (props.source.uri) {
source = props.source
if (url) {
if (url.uri) {
source = url
} else {
source = {uri: props.source}
source = {uri: url}
}

@@ -119,0 +119,0 @@ }

{
"name": "@unpourtous/react-native-image-indicator",
"version": "1.0.5",
"version": "1.0.6",
"description": "react native component for image with indicator and default image",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

# A component for image with indicator and default image
# A Image Component with Indicator, Default Image and Error Default Image

@@ -7,3 +7,3 @@ [![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

A component for image with indicator and default image<br>
A image component with indicator and error default image

@@ -21,52 +21,22 @@ <img src='https://github.com/UnPourTous/react-native-image-indicator/blob/master/screenshots/react-native-image-indicator-demo.gif?raw=true' />

<CustomImage
style={{alignItems: 'center', justifyContent: 'center', height:300,width:300, backgroundColor: '#fdf9e6'}}
source={'image url'}
defaultImage={require('./images/default.jpg')}
errorImage={require('./images/error.png')}
/>
<CustomImage
style={{alignItems: 'center', justifyContent: 'center', height:300,width:300, backgroundColor: '#fdf9e6'}}
source={'image url'}
defaultImage={require('./images/default.jpg')}
errorImage={require('./images/error.png')} />
```
## API
Props
-----
Props | Type | Description
--- | --- | ---
source | string | The remote URL image source.
defaultImage | number | The image before remote image loaded
errorImage | number | The image when remote image loade failed
renderIndicator | function | The function that render indicator component(exclusion indicator when renderIndicator setted)
indicator | function | The indicator component when image is loading
indicatorProps | object | The props of indicator component
threshold | number | Delay before indicator component show in milliseconds, default value 50.
### `source`
The remote URL image source.
type: `string`
### `defaultImage`
The image before remote image loaded
type: `number`
### `errorImage`
The image when remote image loade failed
type: `number`
### `renderIndicator`
the function that render indicator component(exclusion indicator when renderIndicator setted)
type: `function`
### `indicator`
the indicator component when image is loading
type: `function`
### `indicatorProps`
the props of indicator component
type: `object`
### `threshold`
delay milliseconds before indicator component show
type: `number`
defaultValue: `50`
## License
This library is distributed under MIT Licence.<br>
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FUnPourTous%2Freact-native-image-indicator.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FUnPourTous%2Freact-native-image-indicator?ref=badge_large)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc