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

Version Path
playbook_ui-10.13.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.13.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.13.0.pre.node.update app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.9.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.8.1.pre.alpha.flexdeps app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.9.0.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.8.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.7.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.7.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.6.2.pre.alpha.dep app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.6.1.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.6.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.5.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.4.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.3.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.2.1.alpha.sisensefix app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-10.2.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx