/* eslint-enable import/no-unresolved, import/extensions */
import { black } from './colors';
import { ELEVATION_ZINDEX } from './constants';

const getPlatformElevation = (elevation) => {
    if (elevation !== 0) {
        return {
            shadowColor: black,
            shadowOpacity: 0.3,
            shadowRadius: elevation,
            shadowOffset: {
                height: 2,
                width: 0,
            },
            // we need to have zIndex on iOS, otherwise the shadow is under components that
            // are rendered later
            zIndex: ELEVATION_ZINDEX,
        };
    }
    return { };
};

export default getPlatformElevation;

@@ -67,16 +67,29 @@
  %7B black
+, transparent
  %7D from 
@@ -100,16 +100,16 @@
 olors';%0A
-
 import %7B
@@ -199,39 +199,8 @@
 %3E %7B%0A
-    if (elevation !== 0) %7B%0A    
     
@@ -212,28 +212,24 @@
 n %7B%0A        
-   
- 
 shadowColor:
@@ -233,25 +233,53 @@
 or: 
-black,%0A  
+elevation %3E 0 ? black : transparent,%0A
         
   sh
@@ -270,26 +270,24 @@
 nt,%0A        
-  
 shadowOpacit
@@ -294,20 +294,16 @@
 y: 0.3,%0A
-    
         
@@ -325,22 +325,22 @@
 levation
-,%0A    
+ / 2,%0A
         
@@ -371,20 +371,16 @@
     
-   
- 
 height: 
 2,%0A 
@@ -375,23 +375,19 @@
 height: 
-2
+1
 ,%0A
-    
         
@@ -412,19 +412,11 @@
     
-    %7D,%0A    
+%7D,%0A
     
@@ -507,20 +507,16 @@
         
- 
-   
 // are r
@@ -529,20 +529,16 @@
 d later%0A
-    
         
@@ -570,34 +570,8 @@
 %0A   
-     %7D;%0A    %7D%0A    return %7B
  %7D;%0A

Fix shadow props on iOS (#225)