From ecb92a44bc5a4b433f2a673fc77199c7b8a6dc18 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Wed, 7 Nov 2018 21:38:54 -0800
Subject: feat: create PaymentMethodDropdown

---
 packages/instant/src/components/ui/dropdown.tsx | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

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

diff --git a/packages/instant/src/components/ui/dropdown.tsx b/packages/instant/src/components/ui/dropdown.tsx
index ae4731b6f..d51060c05 100644
--- a/packages/instant/src/components/ui/dropdown.tsx
+++ b/packages/instant/src/components/ui/dropdown.tsx
@@ -17,7 +17,7 @@ export interface DropdownItemConfig {
 
 export interface DropdownProps {
     value: string;
-    label: string;
+    label?: string;
     items: DropdownItemConfig[];
 }
 
@@ -27,14 +27,7 @@ export interface DropdownState {
 
 export class Dropdown extends React.Component<DropdownProps, DropdownState> {
     public static defaultProps = {
-        items: [
-            {
-                text: 'Item 1',
-            },
-            {
-                text: 'Item 2',
-            },
-        ],
+        items: [],
     };
     public state: DropdownState = {
         isOpen: false,
@@ -57,7 +50,7 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
                     <Container
                         cursor={hasItems ? 'pointer' : undefined}
                         onClick={this._handleDropdownClick}
-                        hasBoxShadow={true}
+                        hasBoxShadow={isOpen}
                         borderRadius={borderRadius}
                         border="1px solid"
                         borderColor={ColorOption.feintGrey}
@@ -69,9 +62,11 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
                                 {value}
                             </Text>
                             <Container>
-                                <Text fontSize="16px" fontColor={ColorOption.lightGrey}>
-                                    {label}
-                                </Text>
+                                {label && (
+                                    <Text fontSize="16px" fontColor={ColorOption.lightGrey}>
+                                        {label}
+                                    </Text>
+                                )}
                                 {hasItems && (
                                     <Container marginLeft="5px" display="inline-block" position="relative" bottom="2px">
                                         <Icon padding="3px" icon="chevron" width={12} stroke={ColorOption.grey} />
-- 
cgit v1.2.3

