Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-viewpager

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-viewpager - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "rn-viewpager",
"version": "1.0.4",
"version": "1.0.5",
"description": "ViewPager component for react-native, same api on both android and ios.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,1 +0,75 @@

# React-Native-ViewPager
# React-Native-ViewPager
## Usage
### Install from npm:
`npm install --save rn-viewpager`
### Integrate into your app:
```
import React, {Component, StyleSheet, View, Text} from 'react-native';
import {IndicatorViewPager, PagerTitleIndicator, PagerDotIndicator} from 'rn-viewpager';
export default class ViewPagerPage extends Component {
state = {
count: 0
};
render() {
console.log('render:' + this.state.count);
return (
<View style={{flex:1}}>
<IndicatorViewPager
style={{height:200}}
indicator={this._renderDotIndicator()}
>
<View style={{backgroundColor:'cadetblue'}}>
<Text>{'count' + this.state.count}</Text>
</View>
<View style={{backgroundColor:'cornflowerblue'}}>
<Text>page two</Text>
</View>
<View style={{backgroundColor:'#1AA094'}}>
<Text>page three</Text>
</View>
</IndicatorViewPager>
<IndicatorViewPager
style={{flex:1,marginTop:10}}
indicator={this._renderTitleIndicator()}
>
<View style={{backgroundColor:'cadetblue'}}>
<Text>{'count' + this.state.count}</Text>
</View>
<View style={{backgroundColor:'cornflowerblue'}}>
<Text>page two</Text>
</View>
<View style={{backgroundColor:'#1AA094'}}>
<Text>page three</Text>
</View>
</IndicatorViewPager>
</View>
);
}
_renderTitleIndicator() {
return (
<PagerTitleIndicator
titles={['one', 'two', 'three']}
/>
);
}
_renderDotIndicator() {
return (
<PagerDotIndicator
pageCount={3}
/>
);
}
}
```
## TODO

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc