File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff 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
4246const 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} / >>
You can’t perform that action at this time.
0 commit comments