Skip to content

Commit

Permalink
issue: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Sep 19, 2018
1 parent 8481e8e commit c2130c0
Showing 1 changed file with 55 additions and 3 deletions.
58 changes: 55 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,65 @@
# react-fade-image
> Fade or lazy image for react

## properties:
```javascript
AUTO_PROPERTIES

static propTypes = {
className: PropTypes.string,
onChange: PropTypes.func,
value: PropTypes.bool
};

static defaultProps = {
onChange: noop,
value: false
};

```

## install && import:
```bash
npm install --save afeiship/react-fade-image --registry=https://registry.npm.taobao.org
```

```js
import ReactFadeImage from 'react-fade-image';
```

```scss
// customize your styles:
$react-fade-image-options:(
);

@import 'node_modules/react-fade-image/dist/style.scss';
```


## usage:
```jsx
AUTO_USAGE

// install: npm install afeiship/react-fade-image --save
// import : import ReactFadeImage from 'react-fade-image'

class App extends React.Component{
state = {

};

constructor(props){
super(props);
window.demo = this;
window.refs = this.refs;
window.rc = this.refs.rc;
}

render(){
return (
<div className="hello-react-fade-image">
<ReactFadeImage value={false} src="http://imglf4.nosdn.127.net/img/KzNuMlRKSFVENitYYjJBYnU5Q2cwQjRjd0ljSURUWmxZeGxvWVlOYnhHZWRReFBoUVJWUXFRPT0.jpg?imageView&thumbnail=1680x0&quality=96&stripmeta=0&type=jpg" ref='rc' />
</div>
);
}
}

```

0 comments on commit c2130c0

Please sign in to comment.