Skip to content

Commit

Permalink
feat(text fields): added ability to disable last pass in secure input…
Browse files Browse the repository at this point in the history
… fields
  • Loading branch information
jstettner committed Jul 24, 2018
1 parent ce91fff commit 6b2246f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/blockchain-info-components/src/Form/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styled from 'styled-components'

const BaseTextInput = styled.input.attrs({
type: 'text',
'data-lpignore': props => props.noLastPass,
disabled: props => props.disabled
})`
display: block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const TextBox = field => {
placeholder,
center,
errorBottom,
noLastPass,
borderRightNone
} = field
const { initial, active, touched, error, warning } = meta
Expand All @@ -49,6 +50,7 @@ const TextBox = field => {
initial={initial}
placeholder={placeholder}
center={center}
noLastPass={noLastPass}
/>
{touched &&
error && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,42 +63,43 @@ const ThirdStep = props => {
<Wrapper>
{hasError ? (
<Link
size='14px'
size="14px"
weight={300}
onClick={previousStep}
style={{ margin: '10px 0' }}
>
<FormattedMessage
id='scenes.securitycenter.walletrecoveryphrase.thirdstep.reviewPhrase'
defaultMessage='Review your backup phrase'
id="scenes.securitycenter.walletrecoveryphrase.thirdstep.reviewPhrase"
defaultMessage="Review your backup phrase"
/>
</Link>
) : null}
<Form onSubmit={handleSubmit}>
<Container>
{indexes.map(index => (
<WordContainer key={index}>
<Text size='14px' weight={300} style={{ marginBottom: '4px' }}>
<Text size="14px" weight={300} style={{ marginBottom: '4px' }}>
{`${languageHelper(index)} word`}
</Text>
<Field
name={`w${index}`}
component={TextBox}
validate={[required]}
errorBottom
noLastPass
/>
</WordContainer>
))}
</Container>
<Buttons>
<Button
type='submit'
nature='primary'
type="submit"
nature="primary"
disabled={submitting || invalid}
>
<FormattedMessage
id='scenes.securitycenter.walletrecoveryphrase.thirdstep.confirm'
defaultMessage='Confirm'
id="scenes.securitycenter.walletrecoveryphrase.thirdstep.confirm"
defaultMessage="Confirm"
/>
</Button>
</Buttons>
Expand Down

0 comments on commit 6b2246f

Please sign in to comment.