-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathUsageCustom.tsx
27 lines (25 loc) · 944 Bytes
/
UsageCustom.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
import * as React from 'react';
import { View, TouchableWithoutFeedback } from 'react-native';
import { HeaderButtons, Item } from 'react-navigation-header-buttons';
import type { ScreenProps } from '../NavTypes';
import { ScreenBody } from '../components/ScreenBody';
export function UsageCustom({ navigation }: ScreenProps<'UsageCustom'>) {
React.useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<HeaderButtons>
<Item
title="capitalized"
style={{ marginTop: 20 }}
onPress={() => alert('misaligned')}
buttonStyle={{ textTransform: 'capitalize' }}
/>
<TouchableWithoutFeedback onPress={() => alert('green square')}>
<View style={{ height: 25, width: 25, backgroundColor: 'green' }} />
</TouchableWithoutFeedback>
</HeaderButtons>
),
});
}, [navigation]);
return <ScreenBody />;
}