You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
36 lines
1.0 KiB
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import styles from './RecoverForm.scss'
|
|
|
|
const RecoverForm = ({ recoverSeedInput, updateRecoverSeedInput }) => (
|
|
<div className={styles.container}>
|
|
<ul className={styles.seedContainer}>
|
|
{Array(24)
|
|
.fill('')
|
|
.map((word, index) => (
|
|
<li key={index}>
|
|
<section>
|
|
<label htmlFor={index}>{index + 1}</label>
|
|
</section>
|
|
<section>
|
|
<input
|
|
type="text"
|
|
id={index}
|
|
placeholder="word"
|
|
value={recoverSeedInput[index] ? recoverSeedInput[index].word : ''}
|
|
onChange={event => updateRecoverSeedInput({ word: event.target.value, index })}
|
|
className={styles.word}
|
|
/>
|
|
</section>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</div>
|
|
)
|
|
|
|
RecoverForm.propTypes = {
|
|
recoverSeedInput: PropTypes.array.isRequired,
|
|
updateRecoverSeedInput: PropTypes.func.isRequired
|
|
}
|
|
|
|
export default RecoverForm
|
|
|