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