Sha256: 111e343afe02cbdf3e0376c0e7eff09a7a6b97ac8125f6f6bd7c01349b3458e4

Contents?: true

Size: 816 Bytes

Versions: 131

Compression:

Stored size: 816 Bytes

Contents

import React, { useState } from 'react'

import Passphrase from '../_passphrase'
import Body from '../../pb_body/_body'

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

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

  const COMMON_PASSPHRASES = ['passphrase', 'apple', 'password', 'p@55w0rd']

  const commonCheck = (passphrase) => {
    if (COMMON_PASSPHRASES.includes(passphrase))
      return true
    return false
  }

  return (
    <>
      <div>
        <Body text={`Try typing any of the following: ${COMMON_PASSPHRASES.join(' ')}`} />
        <br />
        <Passphrase
            common={commonCheck(input)}
            onChange={handleChange}
            value={input}
            {...props}
        />
      </div>
    </>
  )
}

export default PassphraseCommon

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_common.jsx
playbook_ui-10.13.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.13.0.pre.node.update app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.9.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.8.1.pre.alpha.flexdeps app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.9.0.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.8.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.7.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.7.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.6.2.pre.alpha.dep app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.6.1.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.6.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.5.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.4.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.3.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.2.1.alpha.sisensefix app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx
playbook_ui-10.2.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx