From 03173cd03e4b2842cdb55f405dc32dde261e3e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Osadnik?= Date: Wed, 14 Oct 2020 15:45:34 +0300 Subject: [PATCH] Add elevation prop --- src/ShadowStack.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ShadowStack.js b/src/ShadowStack.js index 764385d..d1639c5 100644 --- a/src/ShadowStack.js +++ b/src/ShadowStack.js @@ -1,6 +1,6 @@ import PropTypes from "prop-types"; import React, { useCallback } from "react"; -import { StyleSheet, View } from "react-native"; +import { StyleSheet, View, Platform } from "react-native"; import ShadowItem from "./ShadowItem"; const ShadowStack = React.forwardRef( @@ -14,6 +14,7 @@ const ShadowStack = React.forwardRef( shadows, style, width, + elevation = 6, ...props }, ref @@ -54,6 +55,7 @@ const ShadowStack = React.forwardRef( style={StyleSheet.absoluteFill} width={width} zIndex={shadows.length + 2} + elevation={elevation} > {children}