kerim Erkan
kerim Erkan

Reputation: 171

Changing Header Height of Stack Navigator

I have been trying to change the height of my stack navigator header. However, nothing is working!

<Stack.Navigator initialRouteName="LiveLandingScreen">
      <Stack.Screen name="LiveLandingScreen" component={LiveLandingScreen} />
      <Stack.Screen name="History" component={History} />
</Stack.Navigator>

the code is working fine but could anyone help me with changing the header height, please?

thanks

Upvotes: 3

Views: 5381

Answers (1)

Amir Doreh
Amir Doreh

Reputation: 1429

What you need is doing this, if we suppose you want to change the height of header bar for History you will do :

<Stack.Navigator initialRouteName="LiveLandingScreen">
      <Stack.Screen name="LiveLandingScreen" component={LiveLandingScreen} />
      <Stack.Screen name="History" component={History} option={{headerStyle: {height: 60}}} />.  ///ADD OPTION
</Stack.Navigator>

I hope it helps <3

Upvotes: 0

Related Questions