Sha256: 6b35aefce436023c0e65bf085bcf911051d77188b1c961a8d00e149600d0457c
Contents?: true
Size: 978 Bytes
Versions: 840
Compression:
Stored size: 978 Bytes
Contents
import React, { useState } from 'react' import {Body, Passphrase} from '../..' const PassphraseConfirmation = (props) => { const [input, setInput] = useState('') const [confirmationInput, setConfirmationInput] = useState('') const handleChange = (e) => setInput(e.target.value) const handleConfirmationChange = (e) => setConfirmationInput(e.target.value) return ( <> <div> <Passphrase onChange={handleChange} value={input} {...props} /> <Passphrase confirmation onChange={handleConfirmationChange} value={confirmationInput} {...props} /> {input && confirmationInput && ( <Body text={ input === confirmationInput ? "They match!" : "They don't match!" } {...props} /> )} </div> </> ); } export default PassphraseConfirmation
Version data entries
840 entries across 840 versions & 2 rubygems