1.0.2 • Published 4 years ago

input_code v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

How to use ?

import { CodeInput } from "./inputCode"
...
export default () => {
  const [code, setCode] = useState("")

  return <CodeInput values={code} title="Enter your digit code" fields={4} onComplete={(val: string) => setCode(val)} />
}

Properties ?

namedetails
fieldsnumber of boxes, default is 6
valuesvalue is string
classNameclassname of wrapper
onChangeevent's fired when one box get updated
onCompleteevent's fired when one box get updated

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT