From a2e3d4eb1ff14a3f02a83c70b9b75a516571e2ed Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Thu, 22 Nov 2018 16:14:21 +0100 Subject: [PATCH 1/2] add token message --- .../components/AddTokenMessage/index.js | 57 +++++++++++++++++++ .../Wallet/views/Account/Summary/index.js | 2 + 2 files changed, 59 insertions(+) create mode 100644 src/views/Wallet/views/Account/Summary/components/AddTokenMessage/index.js diff --git a/src/views/Wallet/views/Account/Summary/components/AddTokenMessage/index.js b/src/views/Wallet/views/Account/Summary/components/AddTokenMessage/index.js new file mode 100644 index 00000000..1167de60 --- /dev/null +++ b/src/views/Wallet/views/Account/Summary/components/AddTokenMessage/index.js @@ -0,0 +1,57 @@ +/* @flow */ +import styled from 'styled-components'; +import React from 'react'; + +import { H2 } from 'components/Heading'; +import P from 'components/Paragraph'; + +const Wrapper = styled.div` + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +`; + +const StyledSVG = styled.svg` + margin-bottom: 24px; +`; + +const AddTokenMessage = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Add your tokens

+

Search for the token or add them manually by pasting token address into search input.

+
+); +export default AddTokenMessage; \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Summary/index.js b/src/views/Wallet/views/Account/Summary/index.js index b18a420b..7c91efa8 100644 --- a/src/views/Wallet/views/Account/Summary/index.js +++ b/src/views/Wallet/views/Account/Summary/index.js @@ -16,6 +16,7 @@ import Link from 'components/Link'; import { FONT_WEIGHT, FONT_SIZE } from 'config/variables'; import AccountBalance from './components/Balance'; import AddedToken from './components/Token'; +import AddTokenMessage from './components/AddTokenMessage'; import type { Props } from './Container'; @@ -145,6 +146,7 @@ const AccountSummary = (props: Props) => { /> + { tokens.length < 1 && () } {tokens.map(token => ( Date: Thu, 22 Nov 2018 16:25:20 +0100 Subject: [PATCH 2/2] Revert "Turn off autocomplete" This reverts commit 8127a1a105f973d49286573727e16e16634ecdae. --- src/components/inputs/Input/index.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/inputs/Input/index.js b/src/components/inputs/Input/index.js index 0a1bd3c0..cf296bf2 100644 --- a/src/components/inputs/Input/index.js +++ b/src/components/inputs/Input/index.js @@ -154,8 +154,12 @@ class Input extends PureComponent { render() { return ( - - {this.props.topLabel && {this.props.topLabel}} + + {this.props.topLabel && ( + {this.props.topLabel} + )} {this.props.state && ( @@ -167,9 +171,11 @@ class Input extends PureComponent { {this.props.icon} 0} innerRef={this.props.innerRef} hasAddon={!!this.props.sideAddons} + type={this.props.type} color={this.getColor(this.props.state)} placeholder={this.props.placeholder} autocomplete={this.props.autocomplete} @@ -177,13 +183,13 @@ class Input extends PureComponent { autocapitalize={this.props.autocapitalize} spellCheck={this.props.spellCheck} value={this.props.value} + readOnly={this.props.readOnly} onChange={this.props.onChange} onClick={this.props.autoSelect ? event => event.target.select() : null} borderColor={this.getColor(this.props.state)} disabled={this.props.isDisabled} name={this.props.name} data-lpignore="true" - {...this.props} /> {this.props.trezorAction} @@ -192,7 +198,9 @@ class Input extends PureComponent { {this.props.sideAddons && this.props.sideAddons.map(sideAddon => sideAddon)} {this.props.bottomText && ( - + {this.props.bottomText} )} @@ -227,7 +235,6 @@ Input.propTypes = { Input.defaultProps = { type: 'text', - autocomplete: false, autoSelect: false, };