react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v2] `transparent: true` vs. `background: { color: 'transparent' }`

Open ilovett opened this issue 8 years ago • 9 comments

If default has background.color: 'red' and component has transparent: true the red background will still be displayed.

    static get options() {
        return {
            topBar: {
                drawBehind: true,
                transparent: true,
                background: {
                    color: 'transparent'
                }
            }
        };
    }

Perhaps move transparent to background.transparent = true

ilovett avatar Jun 27 '18 20:06 ilovett

Also there appears to be a border left over even if topBar.noBorder = true

image

Also tried elevation: 0 which did not make the border shadow go away

ilovett avatar Jun 27 '18 20:06 ilovett

https://github.com/wix/react-native-navigation/issues/3400 Did you using showModal with this options.

sapjax avatar Jun 28 '18 04:06 sapjax

I did this just using a basic screen component, no modals involved... my defaults had a background.color = 'red' and I had to override the default in the component with background.color = 'transparent'

ilovett avatar Jun 28 '18 17:06 ilovett

I had the same issue. Any solution please. Thanks

salisuabubakar avatar Jul 06 '18 11:07 salisuabubakar

Seeing the same thing here.

topBar: {
  noBorder: true,
  visible: true,
  drawBehind: true,
  transparent: true,
  title: {
    text: 'Foobar',
    color: 'white',
  },
  background: {
    color: 'transparent',
  },              
},

The top bar background shows up as black, in this case.

wilsontr avatar Jul 27 '18 19:07 wilsontr

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

stale[bot] avatar Sep 10 '18 19:09 stale[bot]

The issue has been closed for inactivity.

stale[bot] avatar Sep 17 '18 20:09 stale[bot]

Hey guys, we're deprecating the transparent property as it really does duplicate topBar.background.color property.

guyca avatar Sep 27 '18 11:09 guyca

transparent property was removed in v2.0.2570. The blur and translucent properties changed as well and are now part of the background node:

options: {
  topBar: {
    background: {
      color: 'transparent',
      translucent: true,
      blur: false
    }
  }
}

guyca avatar Oct 03 '18 05:10 guyca