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-11.13.0.pre.alpha.fontawesome1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.13.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.12.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.13.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.11.0.pre.alpha.paginate2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.11.0.pre.alpha.dialog2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.11.0.pre.alpha.paginate1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.11.0.pre.alpha.renderer1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.11.0.pre.alpha.dialog1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.10.0.pre.alpha.pre.bold1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.10.0.pre.alpha.pagination1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.9.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.9.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.8.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.8.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.7.0.pre.alpha.table1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx