0.1.4 • Published 3 years ago

react-scratch-easy v0.1.4

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

Installation

$ npm install react-scratch-easy

import { ScratchImage } from 'react-scratch-easy';

<ScratchImage
	showReset={true}
	showConfirmText={true}
	showResetText={true}
	finishPercent={35}
	// onComplete={}
	//outerImageSrc='image src'
/>;

Props

Required Props

NoPropsDescriptionDefault
1outerImageSrcimage url for scratching area
2onCompleterequires a callback functionnone
2finishPercentrequires a number between 1 - 10035

Optional Props

NoPropsDescriptionDefault
1resetTextcan pass any text valueReset
2confirmTextcan pass any text valueConfirm
3outerImageWHscratch image width and heightwidth=100%, height=300px
4innerImageWHinner image width and heightwidth=200px, height=200px
5showResetTextBooleantrue
6showConfirmTextBooleantrue
7confirmBtncan pass any button cssnone
8resetBtncan pass any button cssnone