0.0.6 • Published 5 years ago

@thalesness/react-native-canvas-scratch-card v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

react-native-canvas-scratch-card

A React Native component for scratch card on Android.

Installation


Install from npm (only support RN >= 0.40)

npm install @thalesness/react-native-canvas-scratch-card --save

Link native code

react-native link @thalesness/react-native-canvas-scratch-card

Usage

import React, { Component } from "react";
import { AppRegistry, View } from "react-native";

import { ScratchCard } from "@thalesness/react-native-canvas-scratch-card";

export default class example extends Component {
  render() {
    return <ScratchCard strokeWidth={40} fillColor={"#FF0000"} bgImage={{
         filename: “bulb.png”,
         directory: “”
       }} />;
  }
}

AppRegistry.registerComponent("example", () => example);