magicmc / react-native-shine-label

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-shine-label

Demo come first

Getting started

Mostly automatic installation

  1. git clone https://github.com/magicmc/react-native-shine-label
  2. add "react-native-shine-label": "file:./lib/react-native-shine-label" in package.json
  3. run react-native link react-native-shine-label

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-shine-label and add RNShineLabelReactNative.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNShineLabelReactNative.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNShineLabelReactNativePackage; to the imports at the top of the file
  • Add new RNShineLabelReactNativePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-shine-label'
    project(':react-native-shine-label').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-shine-label/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-shine-label')
    

Usage

import ShineLabelView from 'react-native-shine-label';


<ShineLabelView ref={( self ) => { this.shineLabelView = self  }}  style={{height:200, width:200}} autoStart={true} text="just a sample" fontColor="#00BBFF" font="Roboto-MediuM" fontSize={20} />

this.shineLabelView.shine();
this.shineLabelView.fadeOut();
// TODO: What to do with the module?
  

About


Languages

Language:Objective-C 47.4%Language:Java 41.1%Language:JavaScript 8.1%Language:Ruby 3.3%