render() {
return (
{this.createNavigationBarWithTheme}
)
}
transformerTheme = (defaultTheme) => {
console.log("defaultTheme", defaultTheme)
return {
backgroundColor: defaultTheme.brand_primary,
textColor: defaultTheme.color_text_base_inverse
}
}
createNavigationBarWithTheme = (styleWithTheme) => {
console.log("styleWithTheme", styleWithTheme)
return
{this.initStatusBar(styleWithTheme)}
{this.initNav(styleWithTheme)}
}
initNav = (styleWithTheme) => {
let titleView = this.props.titleView ? this.props.titleView :
style={{color: styleWithTheme.textColor}}>{this.props.title}
;let content = this.props.hide ? null :
{this.props.leftButton ? this.props.leftButton : this.getDefaultLeftButton(this.props.backPress)}
{titleView}
{this.props.rightButton}
;
return content;
}