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