Skip to content

Commit 7c01749

Browse files
committed
Update REAMDE
1 parent 9befe10 commit 7c01749

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ See a [demo](http://astrocoders.com/react-image-smooth-loading/).
55

66
# Install
77
```
8-
yarn react-image-smooth-loading styled-components
8+
yarn add react-image-smooth-loading
9+
```
10+
_Note_: styled-components, react and react-dom were added as peer dependencies.
11+
If you don't have then you must install them as well.
12+
```
13+
yarn add react-image-smooth-loading styled-components react react-dom
914
```
10-
1115
# Usage
1216

1317
```js
@@ -40,10 +44,13 @@ to the space given to it by its container.
4044
4145
```js
4246
const props = {
43-
src: '...' // Image source,
44-
placeholder: '...' // Optional image placeholder, overrides globalPlaceholder,
45-
holderClasses: '...' // Img container class
46-
imgClasses: '...' // Classes for <img/> tags
47+
src: PropTypes.string.isRequired,
48+
placeholder: PropTypes.string, // Optional image placeholder, overrides globalPlaceholder,
49+
imgClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
50+
holderClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
51+
placeholderProps: PropTypes.object,
52+
onClick: PropTypes.func,
53+
alt: PropTypes.string,
4754
}
4855

4956
<Img {...props} />>

0 commit comments

Comments
 (0)