File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed
Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ import {
2+ StyleSheet ,
3+ Text ,
4+ TouchableWithoutFeedback ,
5+ View ,
6+ type TouchableWithoutFeedbackProps ,
7+ } from 'react-native' ;
8+ import { Icon } from 'react-native-vector-icons/Icon' ;
9+ import { ITERABLE_INBOX_COLORS } from '../constants/colors' ;
10+
11+ const styles = StyleSheet . create ( {
12+
13+ returnButton : {
14+ alignItems : 'center' ,
15+ flexDirection : 'row' ,
16+ } ,
17+
18+ returnButtonIcon : {
19+ color : ITERABLE_INBOX_COLORS . BUTTON_PRIMARY_TEXT ,
20+ fontSize : 40 ,
21+ paddingLeft : 0 ,
22+ } ,
23+
24+ returnButtonText : {
25+ color : ITERABLE_INBOX_COLORS . BUTTON_PRIMARY_TEXT ,
26+ fontSize : 20 ,
27+ } ,
28+ } ) ;
29+
30+ export const HeaderBackButton = ( props : TouchableWithoutFeedbackProps ) => {
31+ return (
32+ < TouchableWithoutFeedback { ...props } >
33+ < View style = { styles . returnButton } >
34+ < Icon name = "chevron-back-outline" style = { styles . returnButtonIcon } />
35+ < Text style = { styles . returnButtonText } > Inbox</ Text >
36+ </ View >
37+ </ TouchableWithoutFeedback >
38+ ) ;
39+ } ;
Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ import {
2323 IterableInAppCloseSource ,
2424 IterableInAppLocation ,
2525} from '../../inApp' ;
26-
2726import { ITERABLE_INBOX_COLORS } from '../constants' ;
2827import { type IterableInboxRowViewModel } from '../types' ;
28+ import { HeaderBackButton } from './HeaderBackButton' ;
2929
3030/**
3131 * Props for the IterableInboxMessageDisplay component.
@@ -222,6 +222,16 @@ export const IterableInboxMessageDisplay = ({
222222 < View style = { styles . messageDisplayContainer } >
223223 < View style = { styles . header } >
224224 < View style = { styles . returnButtonContainer } >
225+ < HeaderBackButton
226+ onPress = { ( ) => {
227+ returnToInbox ( ) ;
228+ Iterable . trackInAppClose (
229+ rowViewModel . inAppMessage ,
230+ IterableInAppLocation . inbox ,
231+ IterableInAppCloseSource . back
232+ ) ;
233+ } }
234+ />
225235 < TouchableWithoutFeedback
226236 onPress = { ( ) => {
227237 returnToInbox ( ) ;
You can’t perform that action at this time.
0 commit comments