React Puzzle Confirm
dependencies
"react": "^16.9.0", "react-dom": "^16.9.0"
<ReactPuzzleConfirm />
install
Install as a node module
npm i react-puzzle-confirm -S
usage
import React from 'react'import ReactPuzzleConfirm from 'react-puzzle-confirm'import 'react-puzzle-confirm/eact-puzzle-confirm.css' const Demo = <ReactPuzzleConfirm = = = ="Please fit the puzzle piece carefully" ="Slide to complete the puzzle" ="Error" ="Success" ="Close" ="Refresh" = />
props
function
onSuccess default () => console.log('success')
function for successful attempt
function
onFail default () => console.log('fail')
function for failed attempt
function
onClose default () => console.log('close clicked')
function for close button click
string
title default "Please fit the puzzle piece carefully"
string
sliderTitle default "Slide to complete the puzzle"
string
failMessage default"Error"
string
successMessage default"Success"
string
closeButtonLabel default"Close"
string
refrefButtonLabel default "Refresh"
boolean
disableRefreshIdleState default true
important note
For older versions of React 15.0.0 and above (^15.0.0) please install following version with tag react-v15.0.0
or 1.0.16
npm install react-puzzle-confirm@react-v15.0.0 -S
or
npm install react-puzzle-confirm@1.0.16 -S
Thanks
Yusuf Özlü