Sha256: 33cceec5254b0e1a45aea66df61165d0d22c4abc21fc15ce8d7625553595373c
Contents?: true
Size: 807 Bytes
Versions: 131
Compression:
Stored size: 807 Bytes
Contents
import React, { useState } from 'react' import Passphrase from '../_passphrase' const PassphraseDefault = (props) => { const [input, setInput] = useState('') const handleChange = (e) => setInput(e.target.value) const [confoInput, setConfoInput] = useState('') const handleConfoChange = (e) => setConfoInput(e.target.value) return ( <> <div> <Passphrase id="my-passphrase" onChange={handleChange} value={input} {...props} /> <Passphrase confirmation onChange={handleConfoChange} value={confoInput} {...props} /> <span>{input === confoInput ? 'They match!' : 'They don\'t match!'}</span> </div> </> ) } export default PassphraseDefault
Version data entries
131 entries across 131 versions & 1 rubygems