Sha256: bf4c5bfa9774a90cfd7b142220dad82b73a7809d3032cc9b7260f4bd90e7ba42
Contents?: true
Size: 984 Bytes
Versions: 948
Compression:
Stored size: 984 Bytes
Contents
import React, { useState } from 'react' import {Body, Passphrase} from 'playbook-ui' 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
948 entries across 948 versions & 2 rubygems