Kureev / react-native-navbar

Navbar component for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

custom title is not vertical center

yezongyang opened this issue · comments

customTitle: {
position: 'absolute',
left: 0,
right: 0,
bottom: 7,
alignItems: 'center',
}

But you can supply a custom style to your custom component, right?

Sorry, but I'm about to close this issue because it doesn't sound like something actionable.

customTitle: {
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
right:0,
justifyContent: 'center',
alignItems: 'center
}

why you set bottom = 7?

add two line style can fix this

This component also covers a status bar, i.e. +20 pixels from top (at least on iOS). If we make it top: 0, bottom: 0, then it'll overlap the status bar.

oh, i got it. so i have to supply a custom style. Thank you!

Running v1.6.0 which released on Dec 29, 2016, and a customTitle element won't cover status bar by applying styles.navBarTitleContainer instead of styles.customTitle.
Guess it's safe to discard hacky customTitle style now?