Skip to content

Commit

Permalink
Revert ":fire: Remove unused component"
Browse files Browse the repository at this point in the history
This reverts commit 0aeb87f.
  • Loading branch information
massao committed Jun 28, 2019
1 parent b7799c3 commit 8237b5e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/addressInput/addressInput.css
@@ -0,0 +1,13 @@
.input:first-of-type .label {
padding-left: 60px;
}

.input input:first-of-type {
padding-left: 60px;
}

.accountVisualInInput {
position: absolute;
left: -40px;
top: -15px;
}
29 changes: 29 additions & 0 deletions src/components/addressInput/index.js
@@ -0,0 +1,29 @@
import React from 'react';
import ToolBoxInput from '../toolbox/inputs/toolBoxInput';
import AccountVisual from '../accountVisual';
import styles from './addressInput.css';

const AddressInput = ({
handleChange, className, address, label,
}) => {
const showAccountVisual = address.value.length && !address.error;

return <ToolBoxInput
className={className}
label={label}
error={address.error}
value={address.value}
autoFocus={true}
onChange={val => handleChange(val)}
theme={showAccountVisual ? styles : {}}
>
{showAccountVisual
? <figure className={styles.accountVisualInInput}>
<AccountVisual address={address.value} size={50} />
</figure>
: null
}
</ToolBoxInput>;
};

export default AddressInput;

0 comments on commit 8237b5e

Please sign in to comment.