From cdaa1407dacacc53e01a70b1e0ac46536342a4e0 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 1 Nov 2018 18:36:34 -0700 Subject: feat: implement search bar UI --- packages/instant/src/components/erc20_token_selector.tsx | 6 ++++-- packages/instant/src/components/sliding_panel.tsx | 2 +- packages/instant/src/components/ui/icon.tsx | 8 ++++++++ packages/instant/src/components/ui/input.tsx | 1 - packages/instant/src/style/theme.ts | 4 +++- 5 files changed, 16 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index 2f637a1a6..a9728365b 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -5,6 +5,7 @@ import { ColorOption } from '../style/theme'; import { ERC20Asset } from '../types'; import { assetUtils } from '../util/asset'; +import { SearchInput } from './search_input'; import { Circle, Container, Flex, Text } from './ui'; export interface ERC20TokenSelectorProps { @@ -14,7 +15,8 @@ export interface ERC20TokenSelectorProps { export const ERC20TokenSelector: React.StatelessComponent = ({ tokens, onTokenSelect }) => ( - + + {_.map(tokens, token => )} @@ -40,7 +42,7 @@ class TokenSelectorRow extends React.Component { darkenOnHover={true} cursor="pointer" > - + diff --git a/packages/instant/src/components/sliding_panel.tsx b/packages/instant/src/components/sliding_panel.tsx index 678a60cea..9064c220c 100644 --- a/packages/instant/src/components/sliding_panel.tsx +++ b/packages/instant/src/components/sliding_panel.tsx @@ -24,7 +24,7 @@ export const Panel: React.StatelessComponent = ({ title, children, o )} - {children} + {children} ); diff --git a/packages/instant/src/components/ui/icon.tsx b/packages/instant/src/components/ui/icon.tsx index 9b83d962a..94ea26900 100644 --- a/packages/instant/src/components/ui/icon.tsx +++ b/packages/instant/src/components/ui/icon.tsx @@ -20,6 +20,7 @@ interface IconInfoMapping { failed: IconInfo; success: IconInfo; chevron: IconInfo; + search: IconInfo; } const ICONS: IconInfoMapping = { closeX: { @@ -52,6 +53,13 @@ const ICONS: IconInfoMapping = { strokeLinecap: 'round', strokeLinejoin: 'round', }, + search: { + viewBox: '0 0 14 14', + fillRule: 'evenodd', + clipRule: 'evenodd', + path: + 'M8.39404 5.19727C8.39404 6.96289 6.96265 8.39453 5.19702 8.39453C3.4314 8.39453 2 6.96289 2 5.19727C2 3.43164 3.4314 2 5.19702 2C6.96265 2 8.39404 3.43164 8.39404 5.19727ZM8.09668 9.51074C7.26855 10.0684 6.27075 10.3945 5.19702 10.3945C2.3269 10.3945 0 8.06738 0 5.19727C0 2.32715 2.3269 0 5.19702 0C8.06738 0 10.394 2.32715 10.394 5.19727C10.394 6.27051 10.0686 7.26855 9.51074 8.09668L13.6997 12.2861L12.2854 13.7002L8.09668 9.51074Z', + }, }; export interface IconProps { diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx index a884ff7cb..65cf838b0 100644 --- a/packages/instant/src/components/ui/input.tsx +++ b/packages/instant/src/components/ui/input.tsx @@ -9,7 +9,6 @@ export interface InputProps { fontSize?: string; fontColor?: ColorOption; placeholder?: string; - onChange?: (event: React.ChangeEvent) => void; } export const Input = diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts index 8a5d56927..d10c9b72c 100644 --- a/packages/instant/src/style/theme.ts +++ b/packages/instant/src/style/theme.ts @@ -10,6 +10,7 @@ export enum ColorOption { lightGrey = 'lightGrey', grey = 'grey', feintGrey = 'feintGrey', + lightestGrey = 'lightestGrey', darkGrey = 'darkGrey', white = 'white', lightOrange = 'lightOrange', @@ -17,11 +18,12 @@ export enum ColorOption { } export const theme: Theme = { - primaryColor: '#512D80', + primaryColor: '#333', black: 'black', lightGrey: '#999999', grey: '#666666', feintGrey: '#DEDEDE', + lightestGrey: '#EEEEEE', darkGrey: '#333333', white: 'white', lightOrange: '#F9F2ED', -- cgit v1.2.3