npm-introscreen

1.0.3 • Public • Published

Basic example

import React from 'react';
import {
StyleSheet,
 
} from 'react-native';
import IntroSlider from 'npm-introscreen';
const styles = StyleSheet.create({
  image: {
  height: 200,
 },
 textStyle1:{
   fontWeight: "400",
   fontSize: 22,
   color:"black"
 }
});
 
 
const slides = [
  {
    key: 'somethun',
    text1:'SIGN UP',
    textStyle1: styles.textStyle1,
    textStyle2:"",
    text:"\n\nComplete our style survey and you will receive a personal stylist",
    // image: require('./Assets/Intro1.png'),
    imageStyle: styles.image,
    backgroundColor: 'white',
  },
  
  {
    key: 'somethun-dos',
    text1:'TRY ON',
    textStyle1: styles.textStyle1,
    textStyle2:"",
    text: '\n\nReceive a selection of handpicked clothing for your child and take 7 days to try everything on.',
    // image: require('./Assets/Intro2.png'),
    imageStyle: styles.image,
    backgroundColor: 'white',
  },
  {
    key: 'somethun1',
    text1:'CHECK OUT',
    textStyle1: styles.textStyle1,
    textStyle2:"",
    text: "\n\nLog in , Check out and leave feedback.Return the rest and that's it! ",
    // image: require('./Assets/Intro3.png'),
    imageStyle: styles.image,
    backgroundColor: 'white',
  }
];
 
_onDone =() =>{
  alert ("Go to Login")
}
 
onSkip =()=>{
  alert("Skip App Intro")
}
 
 
const App: () => React$Node = () => {
  return (
 
      <IntroSlider renderItem={this._renderItem} slides={slides} onDone={this._onDone} onSkip= {this.onSkip} />
       
  
  );
};
 
 
export default App;
 

Package Sidebar

Install

npm i npm-introscreen

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

9.24 kB

Total Files

4

Last publish

Collaborators

  • sourabhtripathi