0.2.0 • Published 1 year ago

react-pinify v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

react-pinify

Simplifying secure PIN input for React applications effortlessly

Usage

npm i react-pinify
import {usePinify, Pinify, Underlined} from 'react-pinify'

const App = () => {

    const pinify = usePinify();

    const formSubmitHandler = () => {
        try {
            const val = pinify.submitEventHandler()
            console.log(val)
        }
        catch (e) {
            console.error(e)
        }
    }

    return <>
        <Pinify 
            reference={pinify.ref} 
            onChange={pinify.valueChangeHandler} 
            defaultStyles = {Underlined}
        />
        <button onClick={formSubmitHandler}>Submit</button>
        {/*JSX*/}
    </>
}
0.2.0

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago