From 4cba70f32e4300cea7396f08687f2e53a7728e68 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Mon, 29 Oct 2018 17:48:17 -0700
Subject: feat: add chevron icon and add it to asset amount input

---
 packages/instant/src/components/ui/icon.tsx | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

(limited to 'packages/instant/src/components/ui/icon.tsx')

diff --git a/packages/instant/src/components/ui/icon.tsx b/packages/instant/src/components/ui/icon.tsx
index 7373c3acd..61b382760 100644
--- a/packages/instant/src/components/ui/icon.tsx
+++ b/packages/instant/src/components/ui/icon.tsx
@@ -1,17 +1,21 @@
 import * as React from 'react';
 
-import { ColorOption } from '../../style/theme';
-
 type svgRule = 'evenodd' | 'nonzero' | 'inherit';
 interface IconInfo {
     viewBox: string;
+    path: string;
     fillRule?: svgRule;
     clipRule?: svgRule;
-    path: string;
+    stroke?: string;
+    strokeOpacity?: number;
+    strokeWidth?: number;
+    strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
+    strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit';
 }
 interface IconInfoMapping {
     failed: IconInfo;
     success: IconInfo;
+    chevron: IconInfo;
 }
 const ICONS: IconInfoMapping = {
     failed: {
@@ -28,12 +32,21 @@ const ICONS: IconInfoMapping = {
         path:
             'M17 34C26.3887 34 34 26.3888 34 17C34 7.61121 26.3887 0 17 0C7.61133 0 0 7.61121 0 17C0 26.3888 7.61133 34 17 34ZM25.7539 13.0977C26.2969 12.4718 26.2295 11.5244 25.6035 10.9817C24.9775 10.439 24.0303 10.5063 23.4878 11.1323L15.731 20.0771L12.3936 16.7438C11.8071 16.1583 10.8574 16.1589 10.272 16.7451C9.68652 17.3313 9.6875 18.281 10.2734 18.8665L14.75 23.3373L15.8887 24.4746L16.9434 23.2587L25.7539 13.0977Z',
     },
+    chevron: {
+        viewBox: '0 0 12 7',
+        path: 'M11 1L6 6L1 1',
+        stroke: 'white',
+        strokeOpacity: 0.5,
+        strokeWidth: 1.5,
+        strokeLinecap: 'round',
+        strokeLinejoin: 'round',
+    },
 };
 
 export interface IconProps {
     width: number;
-    height: number;
-    color: ColorOption;
+    height?: number;
+    color?: string;
     icon: keyof IconInfoMapping;
 }
 export const Icon: React.SFC<IconProps> = props => {
@@ -52,6 +65,11 @@ export const Icon: React.SFC<IconProps> = props => {
                 fill={props.color}
                 fillRule={iconInfo.fillRule || 'nonzero'}
                 clipRule={iconInfo.clipRule || 'nonzero'}
+                stroke={iconInfo.stroke}
+                strokeOpacity={iconInfo.strokeOpacity}
+                strokeWidth={iconInfo.strokeWidth}
+                strokeLinecap={iconInfo.strokeLinecap}
+                strokeLinejoin={iconInfo.strokeLinejoin}
             />
         </svg>
     );
-- 
cgit 

