I tried to add a shadow to a View in my project, but I can't figure out why its not working as expected. The shadow only appears at the bottom and not at the sides and does not fade out:
<View
style={{
width: '100%',
padding: 8,
elevation: 20,
backgroundColor: 'white',
shadowColor: 'green',
margin: 10,
}}>
<TextInput
style={{
borderWidth: 1,
borderRadius: 5,
width: '70%',
borderColor: colors.createWorkout,
backgroundColor: colors.primary,
}}
placeholder={'Title'}
/>
</View>
As suggested in many other questions I am using elevation because I'm on android, but it doesn't seem to work correctly here...
Edit: The View is inside a ScollView with padding, somehow the shadow doesn't apper in the padding. If I put it in a View instead of a ScrollView it works just fine