@thalesness/react-native-canvas-scratch-card
v0.0.6
Published
react-native-canvas-scratch-card allows you to scratch to reveal the image background
Downloads
18
Maintainers
Readme
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);