Skip to content

Using Shadow with absolutely positioned child #89

@Richard-HeadCoach

Description

@Richard-HeadCoach

Not yet an issue, but ....

I am using Shadow with an absolutely positioned child and a zIndex. The positioning gets all messed up. What are the expectations for shadow when used this way?

        <Shadow
          distance={8}
          startColor={reflectionGlowColour}
          endColor="rgba(20, 163, 159, 0.1)"
          paintInside
          style={styles.moodShadowWrapper}
        >
          <View style={[styles.moodWrapper, { zIndex: zIndexes.mood }]}>
            <MoodCircleDisplay onMoodPress={handleMoodPress} />
          </View>
        </Shadow>
      </View>

moodShadowWrapper: {
width: WINDOW_WIDTH * 0.3,
height: WINDOW_WIDTH * 0.3,
justifyContent: 'center',
alignItems: 'center',
overflow: 'hidden',
},
moodWrapper: {
position: 'absolute',
right: WINDOW_WIDTH * 0.05,
bottom: 0,
width: WINDOW_WIDTH * 0.3,
height: WINDOW_WIDTH * 0.3,
borderRadius: WINDOW_WIDTH * 0.15,
justifyContent: 'center',
alignItems: 'center',
overflow: 'hidden',
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions