Sha256: cfc3253ca9fa704aa0ba4426f1c416351d2cda7968ed0350c0423199e9151fac

Contents?: true

Size: 778 Bytes

Versions: 31

Compression:

Stored size: 778 Bytes

Contents

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

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

31 entries across 31 versions & 1 rubygems

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