Sha256: 6e280699bc4f8cc95d051aa5be20585cc677aebe745fd96851ffee38014a35bf

Contents?: true

Size: 774 Bytes

Versions: 31

Compression:

Stored size: 774 Bytes

Contents

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

const PassphraseStrengthChange = (props) => {
  const [input, setInput] = useState('')

  const handleChange = (e) => setInput(e.target.value)

  const [strength, setStrength] = useState(0)
  const handleStrengthChange = (str) => setStrength(str)

  return (
    <>
      <div>
        <Passphrase
            label="Passphrase"
            onChange={handleChange}
            onStrengthChange={handleStrengthChange}
            value={input}
            {...props}
        />
        <TextInput
            disabled
            label="Passphrase Strength"
            readOnly
            value={strength}
        />
      </div>
    </>
  )
}

export default PassphraseStrengthChange

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
playbook_ui-9.9.0.alpha.inline1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.9.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.8.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.7.0.pre.alphawidth1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.7.0.pre.alpha.a11y.btn app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.7.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.6.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.6.1.pre.deps1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.6.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx