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

Version Path
playbook_ui_docs-13.34.1.pre.alpha.play1407statvaluekitinconsistencies3388 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.1.pre.alpha.play1407statvaluekitinconsistencies3388 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.34.1.pre.alpha.PLAY14703378 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.1.pre.alpha.PLAY14703378 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.34.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3370 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3370 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3369 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3369 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3368 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3366 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.0.pre.alpha.PBNTR358responsiveadvancedtablereact3366 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.34.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.33.1.pre.alpha.play1407statvaluekitinconsistencies3352 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.33.1.pre.alpha.play1407statvaluekitinconsistencies3352 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.33.1.pre.alpha.PLAY14063320 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.33.1.pre.alpha.PLAY14063320 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.33.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.33.0.pre.alpha.PBNTR405dropdownformfixesrails3311 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx