Changeset View
Changeset View
Standalone View
Standalone View
native/community-creation/community-creation-navigator.react.js
- This file was added.
// @flow | |||||
import { | |||||
createStackNavigator, | |||||
type StackNavigationProp, | |||||
type StackNavigationHelpers, | |||||
} from '@react-navigation/stack'; | |||||
import * as React from 'react'; | |||||
import CommunityConfiguration from './community-configuration.react.js'; | |||||
import type { RootNavigationProp } from '../navigation/root-navigator.react.js'; | |||||
import { | |||||
CommunityConfigurationRouteName, | |||||
type ScreenParamList, | |||||
type CommunityCreationParamList, | |||||
} from '../navigation/route-names.js'; | |||||
export type CommunityCreationNavigationProp< | |||||
RouteName: $Keys<CommunityCreationParamList>, | |||||
> = StackNavigationProp<ScreenParamList, RouteName>; | |||||
const CommunityCreation = createStackNavigator< | |||||
ScreenParamList, | |||||
CommunityCreationParamList, | |||||
StackNavigationHelpers<ScreenParamList>, | |||||
>(); | |||||
const screenOptions = { | |||||
headerTransparent: true, | |||||
headerBackTitleVisible: false, | |||||
headerTitle: 'Create a community', | |||||
ashoat: I'm not sure since I don't have the link to the Figma designs handy, but if the title is… | |||||
atulAuthorUnsubmitted Done Inline ActionsThanks for catching that, made the change atul: Thanks for catching that, made the change | |||||
headerTintColor: 'white', | |||||
ashoatUnsubmitted Done Inline ActionsI use white directly in the registration flow, but that flow is built for dark mode only. I think you'll need to call useColors in CommunityCreationNavigator, and construct screenOptions with the appropriate color there ashoat: I use `white` directly in the registration flow, but that flow is built for dark mode only. I… | |||||
atulAuthorUnsubmitted Done Inline ActionsUpdated to use colors.panelForegroundLabel atul: Updated to use `colors.panelForegroundLabel` | |||||
headerLeftContainerStyle: { | |||||
paddingLeft: 12, | |||||
}, | |||||
}; | |||||
type Props = { | |||||
+navigation: RootNavigationProp<'CommunityCreation'>, | |||||
... | |||||
}; | |||||
// eslint-disable-next-line no-unused-vars | |||||
function CommunityCreationNavigator(props: Props): React.Node { | |||||
return ( | |||||
<CommunityCreation.Navigator screenOptions={screenOptions}> | |||||
<CommunityCreation.Screen | |||||
name={CommunityConfigurationRouteName} | |||||
component={CommunityConfiguration} | |||||
/> | |||||
</CommunityCreation.Navigator> | |||||
); | |||||
} | |||||
export default CommunityCreationNavigator; |
I'm not sure since I don't have the link to the Figma designs handy, but if the title is different for different screens, this might be something you want to specify to CommunityConfiguration directly:
(Memoized of course)