-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathUsageDifferentFontFamilies.tsx
41 lines (38 loc) · 1.17 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
34
35
36
37
38
39
40
41
import * as React from 'react';
import { Ionicons, MaterialIcons } from '@expo/vector-icons';
import {
HeaderButtons,
HeaderButton,
Item,
HeaderButtonsComponentType,
} from 'react-navigation-header-buttons';
import type { ScreenProps } from '../NavTypes';
import { ScreenBody } from '../components/ScreenBody';
const MultiFontFamilyHeaderButton: HeaderButtonsComponentType = (props) => {
return <HeaderButton {...props} iconSize={23} color="blue" />;
};
export function UsageDifferentFontFamilies({
navigation,
}: ScreenProps<'UsageDifferentFontFamilies'>) {
React.useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<HeaderButtons HeaderButtonComponent={MultiFontFamilyHeaderButton}>
<Item
title="settings-ion"
IconComponent={Ionicons}
iconName="settings"
onPress={() => alert('ionicons settings')}
/>
<Item
title="settings-mat"
IconComponent={MaterialIcons}
iconName="settings"
onPress={() => alert('material settings')}
/>
</HeaderButtons>
),
});
}, [navigation]);
return <ScreenBody />;
}