Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 28a274f

Browse files
committedFeb 23, 2018
Rename package and publish
1 parent 290067b commit 28a274f

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed
 

‎README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,46 @@ React Component to lazy load images using a HOC to track window scroll position.
1717

1818
## Installation
1919

20-
1. Install react-lazy-load-image as a dependency:
20+
1. Install react-lazy-load-image-component as a dependency:
2121
```bash
2222
# Yarn
23-
$ yarn add react-lazy-load-image
23+
$ yarn add react-lazy-load-image-component
2424

2525
# NPM
26-
$ npm i --save react-lazy-load-image
26+
$ npm i --save react-lazy-load-image-component
2727
```
2828
2. Import the LazyLoadImage component:
2929
```javascript
30-
import { LazyLoadImage } from 'react-lazy-load-image'
30+
import { LazyLoadImage } from 'react-lazy-load-image-component'
3131
```
3232

3333
3. Import the trackWindowScroll HOC:
3434
```javascript
35-
import { trackWindowScroll } from 'react-lazy-load-image'
35+
import { trackWindowScroll } from 'react-lazy-load-image-component'
3636
```
3737

3838

3939
## Usage
4040

4141
```javascript
4242
import React from 'react';
43-
import { LazyLoadImage, trackWindowScroll } from 'react-lazy-load-image';
43+
import { LazyLoadImage, trackWindowScroll }
44+
from 'react-lazy-load-image-component';
4445

4546
const Gallery = ({ images, scrollPosition }) => (
4647
<div>
4748
{images.map((image) =>
4849
<LazyLoadImage
4950
key={image.key}
5051
height={image.height}
51-
scrollPosition={scrollPosition} // pass the scrollPosition to the image
52+
scrollPosition={scrollPosition} // pass the scrollPosition
5253
src={image.src} // use normal <img> attributes as props
5354
width={image.width} />
5455
)}
5556
</div>
5657
);
57-
// Wrap Gallery with trackWindowScroll HOC so it receives a scrollPosition prop
58-
// to pass down to the images
58+
// Wrap Gallery with trackWindowScroll HOC so it receives
59+
// a scrollPosition prop to pass down to the images
5960
export default trackWindowScroll(Gallery);
6061
```
6162

@@ -73,4 +74,4 @@ export default trackWindowScroll(Gallery);
7374

7475
## Screenshots
7576

76-
<a href="https://raw.githubusercontent.com/Aljullu/react-lazy-load-image/master/screenshots/example.gif"><img src="https://raw.githubusercontent.com/Aljullu/react-lazy-load-image/master/screenshots/example.gif" alt="" /></a>
77+
<a href="https://raw.githubusercontent.com/Aljullu/react-lazy-load-image-component/master/screenshots/example.gif"><img src="https://raw.githubusercontent.com/Aljullu/react-lazy-load-image-component/master/screenshots/example.gif" alt="" /></a>

‎package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "react-lazy-load-image",
3-
"version": "0.0.1",
2+
"name": "react-lazy-load-image-component",
3+
"version": "1.0.0",
44
"description": " React Component to lazy load images using a HOC to track window scroll position. ",
55
"main": "build/index.js",
66
"peerDependencies": {
@@ -32,7 +32,7 @@
3232
},
3333
"repository": {
3434
"type": "git",
35-
"url": "git+https://github.com/Aljullu/react-lazy-load-image.git"
35+
"url": "git+https://github.com/Aljullu/react-lazy-load-image-component.git"
3636
},
3737
"keywords": [
3838
"react",
@@ -44,7 +44,7 @@
4444
},
4545
"license": "MIT",
4646
"bugs": {
47-
"url": "https://github.com/Aljullu/react-lazy-load-image/issues"
47+
"url": "https://github.com/Aljullu/react-lazy-load-image-component/issues"
4848
},
49-
"homepage": "https://github.com/Aljullu/react-lazy-load-image#readme"
49+
"homepage": "https://github.com/Aljullu/react-lazy-load-image-component#readme"
5050
}

0 commit comments

Comments
 (0)
Please sign in to comment.