1.0.6 • Published 2 years ago
light-button v1.0.6
react-native-light-button
Getting started
$ npm install react-native-light-button --save
Mostly automatic installation
$ react-native link react-native-light-button
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-light-button
and addRNLightButton.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNLightButton.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNLightButtonPackage;
to the imports at the top of the file - Add
new RNLightButtonPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-light-button' project(':react-native-light-button').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-light-button/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-light-button')
Windows
- In Visual Studio add the
RNLightButton.sln
innode_modules/react-native-light-button/windows/RNLightButton.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Light.Button.RNLightButton;
to the usings at the top of the file - Add
new RNLightButtonPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNLightButton from 'react-native-light-button';
// TODO: What to do with the module?
RNLightButton;