26
rated 0 times
[
29]
[
3]
/ answers: 1 / hits: 76275
/ 9 Years ago, tue, december 1, 2015, 12:00:00
I'm trying to use a common Navigation Component I made in React-Native. At the point of calling I want to set the Navigation Bar Tint, Title etc.
Nav Bar Code:
var NavigationBar = React.createClass({
render: function(title, titleColor, NavBarColor) {
var titleConfig = {
title: title,
tintColor: titleColor,
};
return (
<NavBar
title={titleConfig}
tintColor={NavBarColor}
leftButton={<Button style={styles.menuButton}></Button>}
rightButton={<Button style={styles.menuButton}></Button>} />
);
}
});
Applying it on another page:
<NavigationBar title=Categories titleColor=#ffffff NavBarColor=#f0b210/>
How to do this properly? Thanks in advance.
More From » react-native