0.0.2 • Published 7 years ago
rn-gradient-snap-slider v0.0.2
rn-gradient-snap-slider
Getting started
$ npm install rn-gradient-snap-slider --save
Mostly automatic installation
$ react-native link rn-gradient-snap-slider
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜rn-gradient-snap-sliderand addRNGradientSnapSlider.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNGradientSnapSlider.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.reactlibrary.RNGradientSnapSliderPackage;to the imports at the top of the file - Add
new RNGradientSnapSliderPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':rn-gradient-snap-slider' project(':rn-gradient-snap-slider').projectDir = new File(rootProject.projectDir, '../node_modules/rn-gradient-snap-slider/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':rn-gradient-snap-slider')
Windows
- In Visual Studio add the
RNGradientSnapSlider.slninnode_modules/rn-gradient-snap-slider/windows/RNGradientSnapSlider.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Gradient.Snap.Slider.RNGradientSnapSlider;to the usings at the top of the file - Add
new RNGradientSnapSliderPackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import RNGradientSnapSlider from 'rn-gradient-snap-slider';
// TODO: What to do with the module?
RNGradientSnapSlider;