Changing Header Height of Stack Navigator

Viewed 4442

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

1 Answers

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

Related