forked from hadeskers/kardia-mobile-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddressStack.tsx
56 lines (53 loc) · 1.5 KB
/
AddressStack.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* eslint-disable react-native/no-inline-styles */
import React, {useContext} from 'react';
import {
CardStyleInterpolators,
createStackNavigator,
} from '@react-navigation/stack';
import AddressBookSetting from './screens/AddressBookSetting';
import {ThemeContext} from './ThemeContext';
import NewAddress from './screens/NewAddress';
import AddressDetail from './screens/AddressDetail';
const AddressStack = createStackNavigator();
const AddressStackScreen = () => {
const theme = useContext(ThemeContext);
return (
<AddressStack.Navigator
initialRouteName="AddressBook"
screenOptions={{
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
headerStyle: {
shadowColor: 'transparent',
backgroundColor: theme.backgroundColor,
},
headerBackTitleVisible: false,
}}>
<AddressStack.Screen
name="AddressBook"
component={AddressBookSetting}
options={{
headerShown: false
}}
/>
<AddressStack.Screen
name="NewAddress"
component={NewAddress}
options={{
title: 'New address',
headerTitleStyle: {
color: theme.textColor,
},
headerTintColor: theme.textColor,
}}
/>
<AddressStack.Screen
name="AddressDetail"
component={AddressDetail}
options={{
headerShown: false,
}}
/>
</AddressStack.Navigator>
);
};
export default AddressStackScreen;