-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathUsageDifferentFontFamilies.tsx
33 lines (30 loc) · 1.02 KB
/
UsageDifferentFontFamilies.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
import React from 'react';
import { Ionicons, MaterialIcons } from '@expo/vector-icons';
import { View } from 'react-native';
import { HeaderButtons, HeaderButton, Item } from 'react-navigation-header-buttons';
const MultiFontFamilyHeaderButton = (props) => {
return <HeaderButton {...props} iconSize={23} color="blue" />;
};
export function UsageDifferentFontFamilies({ navigation }) {
React.useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<HeaderButtons HeaderButtonComponent={MultiFontFamilyHeaderButton}>
<Item
title="settings-ion"
IconComponent={Ionicons}
iconName="ios-settings"
onPress={() => alert('ionicons settings')}
/>
<Item
title="settings-mat"
IconComponent={MaterialIcons}
iconName="settings"
onPress={() => alert('material settings')}
/>
</HeaderButtons>
),
});
}, [navigation]);
return <View style={{ flex: 1 }}></View>;
}