Comments (14)
That sounds to me like a good first task.
from react-navigation.
There's already tintColor
prop on a back button that is applied.
from react-navigation.
May I ask: why a single color to tint header title and back icon/label? In the standard header, the title is black and the back button is blue (on iOS). I'd like to change the back button color, is there some prop to do that?
from react-navigation.
Okay sounds good, will see if I can get this in within the next few hours.
from react-navigation.
There's already tintColor prop on a back button that is applied.
<HeaderBackButton tintColor = '#fff' onPress={() => navigation.goBack(null)} />
Thanks, works !!
from react-navigation.
If someone can explain what the best naming convention for styling all of the components would be this should be fairly straightforward.
- Title/text colour
- Back arrow tint colour
Anymore? E.g. Would titleStyle and tintColor as 2 individual props on header be ok?
Cc @satya164
from react-navigation.
We should add a single tintColor
property which sets color for both title and back button.
from react-navigation.
@grabbou from the looks of it though the Header class only applies the onPress prop. On my phone so could be wrong but will check it out soon.
from react-navigation.
The BackButton
accepts the prop, but Header
component doesn't accept such an prop, and the screen navigation options aren't passed either.
from react-navigation.
I'm applying tintColor
to my navigationOptions.header
like so:
header: ({ state }) => {
return ({
title: 'Some title',
tintColor: '#ffffff',
However, when logging out header
& props
here, it logs twice directly after each other (double re-render or previous scene => new scene??). The first time header
does not contain my prop, second time it does, but misses the left
property.
Is this correct?
return renderLeftComponent(props);
This passes in props, but does not include the tintColor
prop - apologies I'm a bit confused as to how to get this from within the renderLeftComponent
.
from react-navigation.
Your usage looks correct. But hold off a bit since @grabbou is doing some refactors right now.
it logs twice directly after each other (double re-render or previous scene => new scene??). The first time header does not contain my prop, second time it does, but misses the left property.
I'm not fully sure, but I think it might be related to #48
from react-navigation.
API seems to have changed in 1.0.0-beta, is there a way to use tintColor from navigationOptions = ({navigation}) { ... }
?
from react-navigation.
Yeah, just return headerTintColor
and you are done.
from react-navigation.
There's already tintColor prop on a back button that is applied.
<HeaderBackButton tintColor = '#fff' onPress={() => navigation.goBack(null)} />
from react-navigation.
Related Issues (20)
- RemoveEventListener error in react-native-navigation@4 HOT 8
- Bottom Tabs flash when opening keyboard HOT 2
- Bottom Tab Navigator falls out of viewable area HOT 2
- Wrong header height value for screens inside Native Stack inside another Native Stack with modal presentation on iOS
- headerLargeTitle: true with headerBackTitleVisible: false makes back button animation jerky HOT 1
- Unable to adjust height once the height of tab is reduced and then expanded HOT 4
- RemoveEventListener error in react-native-navigation@4 HOT 21
- Unexpected layout size when screen is out of focus HOT 2
- Nested tabview are not supported?... HOT 1
- useColorScheme is not working with fullScreenModal HOT 2
- react-native-tab-view, Unable to scroll to the top HOT 1
- Drawer position is not correct in Expo 49 HOT 3
- App is freezing if you use drawer navigation on RN 73.7 HOT 3
- Task :react-native-safe-area-context:compileDebugKotlin FAILED HOT 4
- Drawer is not working with react-native-v8
- Keyboard hides => shows => hides when navigating back (from ios gesture only) from a screen where keyboard is shown HOT 1
- IOS fullscreenmodal not switching to dark/light mode when changing appearance HOT 1
- Bottom tab navigation only works for few seconds when refresh then it doesn't work HOT 3
- Cannot style shadow in react navigation header HOT 8
- Not able to navigate to tab while using a custom tab when a new tab/screen is dynamically added at random intervals HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-navigation.