Skip to content

Commit

Permalink
added usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-r committed Apr 2, 2015
1 parent b1abaff commit 281f48f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,48 @@

Based on [react-native framework](https://github.com/facebook/react-native/) (as of 0.3.4) by Facebook.

### Demo


## Demo
![](http://spronin.github.io/img/react.gif)

## Install

```sh
$ npm install react-native-looped-carousel --save
```

## Usage
```js
'use strict';

var React = require('react-native');
var Carousel = require('react-native-looped-carousel');
var Dimensions = require('Dimensions');
var {width, height} = Dimensions.get('window');
var {
AppRegistry,
StyleSheet,
Text,
View
} = React;

var carouselTest = React.createClass({
render: function() {
return (
<Carousel delay={500}>
<View style={{backgroundColor:'#BADA55',width:width,height:height}}/>
<View style={{backgroundColor:'red',width:width,height:height}}/>
<View style={{backgroundColor:'blue',width:width,height:height}}/>
</Carousel>
);
}
});

AppRegistry.registerComponent('carouselTest', () => carouselTest);
```

### Used in
## Used in
- [React Native Buyscreen](https://github.com/appintheair/react-native-buyscreen)

----
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-looped-carousel",
"version": "0.0.2",
"version": "0.0.3",
"description": "Looped carousel for React Native",
"author": "Phil Rukin <[email protected]> (http://rukin.me)",
"contributors": [{
Expand Down

0 comments on commit 281f48f

Please sign in to comment.