Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positioned absolute lightbox opener causing issues #117

Closed
msqar opened this issue Sep 8, 2019 · 1 comment
Closed

Positioned absolute lightbox opener causing issues #117

msqar opened this issue Sep 8, 2019 · 1 comment

Comments

@msqar
Copy link

msqar commented Sep 8, 2019

I wanted to add a positioned absolute View as the lightbox opener inside one of my images. With an icon suggesting: "MAXIMIZE", so i position it with 'absolute' property. Problem is, whenever i attempt to tap on it, it doesn't recognize the event. Whenever i removed the absolute, it started working normally but the size is huge whenever i press the button.

This is my structure:

<Lightbox
                                        springConfig={{tension: 15, friction: 7, overshootClamping: true}}
                                        swipeToDismiss={false}
                                        renderContent={this._renderCarousel}>

                                        <View style={scopedStyles.fullScreenContainer}>
                                            <Icon style={scopedStyles.fullScreenIcon} name={'md-open'} />
                                        </View>
                                    </Lightbox>

This is the styling:

    fullScreenContainer: {
        position: 'absolute',
        height: 50,
        width: 50,
        borderRadius: 25,
        backgroundColor: CommonStyles.BLACK,
        left: 10,
        bottom: 10,
        justifyContent: 'center',
        alignItems: 'center'
    },
    fullScreenIcon: {
        fontSize: 28,
        color: CommonStyles.WHITE
    },

Try it out and let me know if this occurs to you guys as well.

Btw, awesome library :)

@msqar
Copy link
Author

msqar commented Sep 8, 2019

My bad! i had to add the styling to Lightbox component.

@msqar msqar closed this as completed Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant