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.32.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.32.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0.pre.alpha.powercentrainplaybookpt23212 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0.pre.alpha.powercentrainplaybookpt23212 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0.pre.alpha.PLAY10863204 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0.pre.alpha.PLAY10863204 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0.pre.alpha.PLAY10863202 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0.pre.alpha.PLAY10863202 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0.pre.alpha.play1262iconstyles3172 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0.pre.alpha.play1262iconstyles3172 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0.pre.alpha.play1262iconstyles3171 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0.pre.alpha.play1262iconstyles3171 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.31.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.31.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.30.0.pre.alpha.play1367contenttagnoninputkits3159 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.30.0.pre.alpha.play1367contenttagnoninputkits3159 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui_docs-13.30.0.pre.alpha.20240515remotebuildkitconversion3150 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx
playbook_ui-13.30.0.pre.alpha.20240515remotebuildkitconversion3150 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx