1const styles = {
2 container: {
3 flex: 1,
4 },
5};
6
7const rightButtonConfig = {
8 title: 'Next',
9 handler: () => alert('hello!'),
10};
11
12const titleConfig = {
13 title: 'Hello, world',
14};
15
16function ComponentWithNavigationBar() {
17 return (
18 <View style={styles.container}>
19 <NavigationBar
20 title={titleConfig}
21 rightButton={rightButtonConfig}
22 />
23 </View>
24 );
25}