Skip to content

Commit da09b12

Browse files
author
patricktr
committed
update readme
1 parent ae0d53d commit da09b12

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
> Simple, no frills, component for fading in images. Just pass it a src prop.
44
5-
[![NPM](https://img.shields.io/npm/v/react-image-fade-in.svg)](https://www.npmjs.com/package/react-image-fade-in) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
5+
[![NPM](https://img.shields.io/npm/v/react-image-fade-in.svg)](https://www.npmjs.com/package/react-image-fade-in) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) <a href="https://github.com/patricktran/react-image-fade-in" target="\_parent">
6+
<img alt="" src="https://img.shields.io/github/stars/patricktran/react-image-fade-in.svg?style=social&label=Star" />
7+
</a>
68

79
## Install
810

@@ -15,15 +17,13 @@ npm install --save react-image-fade-in
1517
## Usage
1618

1719
```jsx
18-
import React, { Component } from 'react'
20+
import React, { Component } from "react";
1921

20-
import ImageFadeIn from 'react-image-fade-in'
22+
import ImageFadeIn from "react-image-fade-in";
2123

2224
class Example extends Component {
23-
render () {
24-
return (
25-
<ImageFadeIn width={640} height={480} src={imageSrc} />
26-
)
25+
render() {
26+
return <ImageFadeIn width={640} height={480} src={imageSrc} />;
2727
}
2828
}
2929
```
@@ -32,14 +32,14 @@ class Example extends Component {
3232

3333
This a list of props that you can pass down to the component:
3434

35-
| Property | Description | Default value | Type | Required |
36-
| -------- | ----------- | ------------- | ---- | -------- |
37-
| `src` | image source url | | string | yes
38-
| `loadAsBackgroundImage` | if false, renders as an IMG tag. If true, renders a DIV with image as the background-image (style css) | false | bool |
39-
| `opacityTransition` | Duration of the fade in, in seconds (s) | 0.5s | number |
40-
| `onClick` | onClick handler | | function |
41-
| `HTML Global Attributes` | add your own attributes (style, className, id, etc.) |
42-
| `HTML Event Attributes` | add your own events (onBlur, onFocus, onMouseDown, etc.) |
35+
| Property | Description | Default value | Type | Required |
36+
| ------------------------ | ------------------------------------------------------------------------------------------------------ | ------------- | -------- | -------- |
37+
| `src` | image source url | | string | yes |
38+
| `loadAsBackgroundImage` | if false, renders as an IMG tag. If true, renders a DIV with image as the background-image (style css) | false | bool |
39+
| `opacityTransition` | Duration of the fade in, in seconds (s) | 0.5s | number |
40+
| `onClick` | onClick handler | | function |
41+
| `HTML Global Attributes` | add your own attributes (style, className, id, etc.) |
42+
| `HTML Event Attributes` | add your own events (onBlur, onFocus, onMouseDown, etc.) |
4343

4444
## License
4545

0 commit comments

Comments
 (0)