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.7.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.6.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.5.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.7.0.pre.alpha.pre.guagechart1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.6.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.6.0.pre.alpha.rubocopperf1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.6.1.pre.alpha.rubocop.pre.performance1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.5.0.pre.alpha.pre.rubocop app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.6.0.pre.alpha.momenttz1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.5.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.4.0.pre.alpha.rubytheme2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.4.0.pre.alpha.rubytheme1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.4.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.3.0.pre.alpha2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.3.0.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.3.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.2.7 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.2.6 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-11.2.5 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx