diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-15 06:39:23 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-15 06:39:23 +0800 |
commit | 1aae112d0e2c2b6c7ac16b491aa8345fe2aff486 (patch) | |
tree | 25457b39e170451ecbc56fe03918ef6e10b43d5c /packages/instant | |
parent | 80e7e84a06319a79a757406b58df318cce3dfa08 (diff) | |
parent | 504f4d9eb99589b4d9071a6f13cea9dcc11f226d (diff) | |
download | dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.tar dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.tar.gz dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.tar.bz2 dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.tar.lz dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.tar.xz dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.tar.zst dexon-0x-contracts-1aae112d0e2c2b6c7ac16b491aa8345fe2aff486.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/different-install-wallet-copy-for-mobile
Diffstat (limited to 'packages/instant')
6 files changed, 18 insertions, 19 deletions
diff --git a/packages/instant/package.json b/packages/instant/package.json index aa9157bcc..3ad043c2b 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -1,6 +1,6 @@ { "name": "@0x/instant", - "version": "0.0.6", + "version": "0.0.7", "engines": { "node": ">=6.12" }, @@ -45,16 +45,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/asset-buyer": "^2.2.2", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", - "@0x/subproviders": "^2.1.3", + "@0x/assert": "^1.0.17", + "@0x/asset-buyer": "^3.0.0", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", + "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", "bowser": "^2.0.0-beta.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", "lodash": "^4.17.10", diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index d4a77c278..e4d8749a9 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -39,6 +39,7 @@ export class ERC20TokenSelector extends React.Component<ERC20TokenSelectorProps> width="100%" value={this.state.searchQuery} onChange={this._handleSearchInputChange} + tabIndex={-1} /> <Container overflow="scroll" height="calc(100% - 90px)" marginTop="10px"> {_.map(tokens, token => { @@ -62,8 +63,10 @@ export class ERC20TokenSelector extends React.Component<ERC20TokenSelectorProps> if (_.isUndefined(searchQuery)) { return true; } - const stringToSearch = `${token.metaData.name} ${token.metaData.symbol}`; - return _.includes(stringToSearch.toLowerCase(), searchQuery.toLowerCase()); + const searchQueryLowerCase = searchQuery.toLowerCase(); + const tokenName = token.metaData.name.toLowerCase(); + const tokenSymbol = token.metaData.symbol.toLowerCase(); + return _.startsWith(tokenSymbol, searchQueryLowerCase) || _.startsWith(tokenName, searchQueryLowerCase); }; } diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 7f9567454..002695269 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -32,12 +32,7 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> { public render(): React.ReactNode { const iconOrAmounts = this._renderIcon() || this._renderAmountsSection(); return ( - <Container - backgroundColor={ColorOption.primaryColor} - padding="20px" - width="100%" - borderRadius="3px 3px 0px 0px" - > + <Container backgroundColor={ColorOption.primaryColor} padding="20px" width="100%"> <Container marginBottom="5px"> <Text letterSpacing="1px" diff --git a/packages/instant/src/components/ui/container.tsx b/packages/instant/src/components/ui/container.tsx index 8aa5db9e5..4dafe1386 100644 --- a/packages/instant/src/components/ui/container.tsx +++ b/packages/instant/src/components/ui/container.tsx @@ -20,7 +20,7 @@ export interface ContainerProps { marginBottom?: string; marginLeft?: string; padding?: string; - borderRadius?: string; + borderRadius?: MediaChoice; border?: string; borderColor?: ColorOption; borderTop?: string; @@ -57,7 +57,6 @@ export const Container = ${props => cssRuleIfExists(props, 'margin-bottom')} ${props => cssRuleIfExists(props, 'margin-left')} ${props => cssRuleIfExists(props, 'padding')} - ${props => cssRuleIfExists(props, 'border-radius')} ${props => cssRuleIfExists(props, 'border')} ${props => cssRuleIfExists(props, 'border-top')} ${props => cssRuleIfExists(props, 'border-bottom')} @@ -70,6 +69,7 @@ export const Container = ${props => props.display && stylesForMedia<string>('display', props.display)} ${props => props.width && stylesForMedia<string>('width', props.width)} ${props => props.height && stylesForMedia<string>('height', props.height)} + ${props => props.borderRadius && stylesForMedia<string>('border-radius', props.borderRadius)} background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')}; border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')}; &:hover { diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx index 2fb408db4..1ea5d8fe1 100644 --- a/packages/instant/src/components/ui/input.tsx +++ b/packages/instant/src/components/ui/input.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; import { ColorOption, styled } from '../../style/theme'; export interface InputProps { + tabIndex?: number; className?: string; value?: string; width?: string; diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index c0a197590..698bfef17 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -43,7 +43,7 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon zIndex={zIndex.mainContainer} position="relative" backgroundColor={ColorOption.white} - borderRadius="3px" + borderRadius={{ default: '3px', sm: '0px' }} hasBoxShadow={true} overflow="hidden" height="100%" |