From 281f48f48165d439efb068ab5547845c900d2e96 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 2 Apr 2015 23:45:53 +0300 Subject: [PATCH] added usage example --- README.md | 41 +++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9c456c6..0207ddc 100644 --- a/README.md +++ b/README.md @@ -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 ( + + + + + + ); + } +}); + +AppRegistry.registerComponent('carouselTest', () => carouselTest); +``` -### Used in +## Used in - [React Native Buyscreen](https://github.com/appintheair/react-native-buyscreen) ---- diff --git a/package.json b/package.json index aa0c731..74d7972 100644 --- a/package.json +++ b/package.json @@ -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 (http://rukin.me)", "contributors": [{