wix-incubator / react-native-controllers

Native IOS Navigation for React Native (navbar, tabs, drawer)
MIT License
611 stars 82 forks source link

Transparent container doesn't work on Lightbox #44

Closed alexmngn closed 8 years ago

alexmngn commented 8 years ago

Hi @artald It seems like the content of a Lightbox cannot be transparent. I am using the react-native-linear-gradient component within my main component rendered in the Lightbox to create a semi-transparent linear gradient behind the button, but I can't do so.

artboard 2

And when I try to set any type of transparent background to my container, it doesn't render anything at all:

const styles = StyleSheet.create({
    container: {
        backgroundColor: '#ffffffaa',
        flex: 1
    }
});

Also, my main component is not rendered full screen even though I'm using flex: 1

So the issues are:

artald commented 8 years ago

Hi @alexmngn Thanks for letting us know. I will look into these issues.

artald commented 8 years ago

@talkol 53cea08 fixes the transparency issue.

Regarding the 100% screen sizing: even thought flex rules still apply here (if you set at least height or width), I don't think it is possible to fill the whole screen just by using flex: 1. Since we're creating a new RCTRootView which is not simply set as the root of a UIViewController, but is added to another view, a size must be provided - either width or height. So, for a full screen width/height LightBox you'd have to use the screen Dimensions. For a true full screen LightBox which actually covers the whole screen you can also use Dimensions, but preferably use a Modal.

If you don't have any comments regarding this, please include it on the next release. Thanks!

drorbiran commented 8 years ago

@artald, can we close this issue?

artald commented 8 years ago

@drorbiran I think so..