Sha256: 35e5a2d4f6bdd7e2f4475f1d75aa052f1f9e58d2d666acb1dfacbeb73dfbe712

Contents?: true

Size: 802 Bytes

Versions: 22

Compression:

Stored size: 802 Bytes

Contents

import React, { useState } from 'react'
import { Passphrase } from '../../'

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

22 entries across 22 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.15.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.14.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.13.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_default.jsx