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