@towsila/expo-ui-library 4.11.5 → 4.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
-
2
1
  import {
3
- Text, TouchableOpacity, View,
2
+ Text, TouchableOpacity, View, ScrollView, KeyboardAvoidingView, Platform,
4
3
  } from "react-native";
4
+ import { SafeAreaView } from "react-native-safe-area-context";
5
5
 
6
6
  import Input from "../ui/input";
7
7
  import { useAppTheme } from "../../context/ThemeContext";
@@ -12,6 +12,7 @@ import SharpButton from "../ui/sharpButton";
12
12
  import { Fonts, textSize } from "../../tokens/typography";
13
13
  import SharpContainer from "../ui/sharpContainer";
14
14
  import Google from "../../assets/icons/google.svg";
15
+
15
16
  interface LoginScreenProps {
16
17
  title?: string;
17
18
  subtitle?: string;
@@ -55,91 +56,194 @@ export default function LoginScreen({
55
56
  }: LoginScreenProps) {
56
57
  const { colors } = useAppTheme();
57
58
  const form = useLoginForm({ onLogin });
58
- const {isRTL} = useLanguage();
59
- const align = isRTL ? "row-reverse":"row";
59
+ const { isRTL } = useLanguage();
60
+ const align = isRTL ? "row-reverse" : "row";
61
+
60
62
  return (
61
- <View style={{ flex: 1, paddingHorizontal: 20, paddingTop: 60 ,}}>
62
- <ScreenHeader title={title} description={subtitle} />
63
- <View style={{ marginBottom: 20, marginTop: 50, padding: 15, borderRadius: 10, gap: 20 }}>
64
- <Input
65
- label={emailLabel}
66
- value={form.values.email}
67
- onChangeText={(text) => form.setValue("email", text)}
68
- placeholder={emailPlaceholder}
69
- keyboardType="email-address"
70
- error={form.errors.email ? t?.(form.errors.email) : ""}
71
- autoCapitalize="none"
72
- autoComplete="email"
73
- textContentType="emailAddress"
74
- returnKeyType="next"
75
- onClearError={() => form.clearError("email")}
76
- iconLeft={"mail-outline"}
77
- />
78
- <Input
79
- label={passwordLabel}
80
- value={form.values.password}
81
- onChangeText={(value) => form.setValue("password", value)}
82
- placeholder={passwordPlaceholder}
83
- iconRight={form.showPassword ? "eye-off-outline" : "eye-outline"}
84
- onPressIconRight={() => form.setShowPassword(!form.showPassword)}
85
- secureTextEntry={!form.showPassword}
86
- textContentType="password"
87
- returnKeyType="done"
88
- error={form.errors.password ? t?.(form.errors.password) : ""}
89
- onClearError={() => form.clearError("password")}
90
- iconLeft={"lock-closed-outline"}
91
- />
92
- <View style={{gap:10}}>
93
- <SharpButton text={loginButtonLabel} bgColor={colors.primary} onPress={form.handleSubmit} height={50} loading={form.loading} />
94
- <TouchableOpacity onPress={onForgotPassword} activeOpacity={0.7} style={{ alignSelf: isRTL ?"flex-end" :"flex-start" }}>
95
- <Text style={{ fontSize: textSize.xs, color: colors.primary, fontFamily: Fonts.montserrat.semiBold }}>
96
- {forgotPasswordLabel}
63
+ <SafeAreaView style={{ flex: 1, backgroundColor: colors.background.main }}>
64
+ <KeyboardAvoidingView
65
+ style={{ flex: 1 }}
66
+ behavior={Platform.OS === "ios" ? "padding" : undefined}
67
+ keyboardVerticalOffset={Platform.OS === "ios" ? 0 : 20}
68
+ >
69
+ <ScrollView
70
+ contentContainerStyle={{
71
+ flexGrow: 1,
72
+ paddingHorizontal: 20,
73
+ paddingTop: 20,
74
+ paddingBottom: 24,
75
+ }}
76
+ keyboardShouldPersistTaps="handled"
77
+ showsVerticalScrollIndicator={false}
78
+ >
79
+ <ScreenHeader title={title} description={subtitle} />
80
+
81
+ <View
82
+ style={{
83
+ marginTop: 32,
84
+ marginBottom: 20,
85
+ padding: 15,
86
+ borderRadius: 10,
87
+ gap: 20,
88
+ }}
89
+ >
90
+ <Input
91
+ label={emailLabel}
92
+ value={form.values.email}
93
+ onChangeText={(text) => form.setValue("email", text)}
94
+ placeholder={emailPlaceholder}
95
+ keyboardType="email-address"
96
+ error={form.errors.email ? t?.(form.errors.email) : ""}
97
+ autoCapitalize="none"
98
+ autoComplete="email"
99
+ textContentType="emailAddress"
100
+ returnKeyType="next"
101
+ onClearError={() => form.clearError("email")}
102
+ iconLeft={"mail-outline"}
103
+ height={52}
104
+ />
105
+ <Input
106
+ label={passwordLabel}
107
+ value={form.values.password}
108
+ onChangeText={(value) => form.setValue("password", value)}
109
+ placeholder={passwordPlaceholder}
110
+ iconRight={form.showPassword ? "eye-off-outline" : "eye-outline"}
111
+ onPressIconRight={() => form.setShowPassword(!form.showPassword)}
112
+ secureTextEntry={!form.showPassword}
113
+ textContentType="password"
114
+ returnKeyType="done"
115
+ error={form.errors.password ? t?.(form.errors.password) : ""}
116
+ onClearError={() => form.clearError("password")}
117
+ iconLeft={"lock-closed-outline"}
118
+ height={52}
119
+ />
120
+ <View style={{ gap: 10 }}>
121
+ <SharpButton
122
+ text={loginButtonLabel}
123
+ bgColor={colors.primary}
124
+ onPress={form.handleSubmit}
125
+ height={56}
126
+ loading={form.loading}
127
+ />
128
+ <TouchableOpacity
129
+ onPress={onForgotPassword}
130
+ activeOpacity={0.7}
131
+ style={{ alignSelf: isRTL ? "flex-end" : "flex-start" }}
132
+ >
133
+ <Text
134
+ style={{
135
+ fontSize: textSize.sm,
136
+ color: colors.text.secondary,
137
+ fontFamily: Fonts.montserrat.regular,
138
+ }}
139
+ >
140
+ {forgotPasswordLabel}
97
141
  </Text>
98
- </TouchableOpacity>
99
- </View>
100
- </View>
101
- <View style={{ flex: 1, justifyContent: "space-between" }}>
102
- {(onGoogleLogin) && (
142
+ </TouchableOpacity>
143
+ </View>
144
+ </View>
145
+
146
+ {onGoogleLogin && (
103
147
  <View>
104
- <View style={{ flexDirection:align, alignItems: "center", gap: 12, marginVertical: 20, marginHorizontal: 20 }}>
105
- <View style={{ flex: 1, height: 1, backgroundColor: colors.text.secondary, opacity: 0.5 }} />
106
- <Text style={{ fontSize: textSize.xs, color: colors.text.secondary, fontFamily: Fonts.montserrat.regular }}>
107
- {dividerLabel}
108
- </Text>
109
- <View style={{ flex: 1, height: 1, backgroundColor: colors.text.secondary, opacity: 0.5 }} />
110
- </View>
111
- <View style={{ marginHorizontal: 28 }}>
112
- <SharpContainer
113
- bgColor={colors.background.main}
114
- borderColor={colors.text.primary}
115
- height={50}
148
+ <View
149
+ style={{
150
+ flexDirection: align,
151
+ alignItems: "center",
152
+ gap: 12,
153
+ marginVertical: 20,
154
+ marginHorizontal: 20,
155
+ }}
156
+ >
157
+ <View
158
+ style={{
159
+ flex: 1,
160
+ height: 1,
161
+ backgroundColor: colors.text.placeholder,
162
+ opacity: 0.5,
163
+ }}
164
+ />
165
+ <Text
166
+ style={{
167
+ fontSize: textSize.xs,
168
+ color: colors.text.placeholder,
169
+ fontFamily: Fonts.montserrat.regular,
170
+ }}
171
+ >
172
+ {dividerLabel}
173
+ </Text>
174
+ <View
175
+ style={{
176
+ flex: 1,
177
+ height: 1,
178
+ backgroundColor: colors.text.placeholder,
179
+ opacity: 0.5,
180
+ }}
181
+ />
182
+ </View>
183
+ <View style={{ marginHorizontal: 28 }}>
184
+ <SharpContainer
185
+ bgColor={colors.background.main}
186
+ borderColor={colors.text.primary}
187
+ height={56}
188
+ >
189
+ <TouchableOpacity
190
+ style={{
191
+ flexDirection: align,
192
+ alignItems: "center",
193
+ justifyContent: "center",
194
+ gap: 10,
195
+ }}
196
+ onPress={onGoogleLogin}
197
+ >
198
+ <Google width={20} height={20} />
199
+ <Text
200
+ style={{
201
+ fontSize: textSize.sm,
202
+ fontFamily: Fonts.montserrat.semiBold,
203
+ color: colors.text.primary,
204
+ }}
116
205
  >
117
- <TouchableOpacity style={{ flexDirection:align, alignItems: "center", justifyContent: "center", gap: 10 }} onPress={onGoogleLogin}>
118
- <Google width={20} height={20} />
119
- <Text style={{
120
- fontSize: textSize.sm,
121
- fontFamily: Fonts.montserrat.semiBold,
122
- color: colors.text.primary,
123
- }}>
124
- {googleLabel}
125
- </Text>
126
- </TouchableOpacity>
127
- </SharpContainer>
128
- </View>
206
+ {googleLabel}
207
+ </Text>
208
+ </TouchableOpacity>
209
+ </SharpContainer>
210
+ </View>
129
211
  </View>
130
- )}
212
+ )}
131
213
 
132
- <View style={{ flexDirection:align, justifyContent: "center", gap: 4, marginBottom: 70 }}>
133
- <Text style={{ fontSize: textSize.xs, color: colors.text.secondary, fontFamily: Fonts.montserrat.regular }}>
134
- {noAccountLabel}
214
+ {/* Footer — pinned to bottom when there's space, flows naturally otherwise */}
215
+ <View
216
+ style={{
217
+ marginTop: "auto",
218
+ paddingTop: 24,
219
+ flexDirection: align,
220
+ justifyContent: "center",
221
+ gap: 4,
222
+ }}
223
+ >
224
+ <Text
225
+ style={{
226
+ fontSize: textSize.sm,
227
+ color: colors.text.primary,
228
+ fontFamily: Fonts.montserrat.regular,
229
+ }}
230
+ >
231
+ {noAccountLabel}
135
232
  </Text>
136
233
  <TouchableOpacity onPress={onSignUp} activeOpacity={0.7}>
137
- <Text style={{ fontSize: textSize.xs, color: colors.primary, fontFamily: Fonts.montserrat.semiBold }}>
138
- {signUpLabel}
139
- </Text>
234
+ <Text
235
+ style={{
236
+ fontSize: textSize.sm,
237
+ color: colors.primary,
238
+ fontFamily: Fonts.montserrat.semiBold,
239
+ }}
240
+ >
241
+ {signUpLabel}
242
+ </Text>
140
243
  </TouchableOpacity>
141
- </View>
142
- </View>
143
- </View>
244
+ </View>
245
+ </ScrollView>
246
+ </KeyboardAvoidingView>
247
+ </SafeAreaView>
144
248
  );
145
249
  }
@@ -1,5 +1,5 @@
1
- import { Text, TouchableOpacity, View, StyleSheet } from "react-native";
2
- import { ArrowBack} from "@towsila/icons";
1
+ import { Text, TouchableOpacity, View, StyleSheet, ScrollView } from "react-native";
2
+ import { SafeAreaView } from "react-native-safe-area-context";
3
3
  import { useAppTheme } from "../../context/ThemeContext";
4
4
  import { Fonts, textSize } from "../../tokens/typography";
5
5
  import PageIndicator from "../ui/pageIndicator";
@@ -32,92 +32,121 @@ export default function OnBoarding({
32
32
  nextLabel,
33
33
  currentIndex,
34
34
  total,
35
- stepsLabel,
35
+ stepsLabel,
36
36
  }: OnBoardingProps) {
37
37
  const { colors } = useAppTheme();
38
- const {isRTL} = useLanguage();
38
+ const { isRTL } = useLanguage();
39
+
39
40
  return (
40
- <View
41
- style={[
42
- styles.container,
43
- { backgroundColor: colors.background.main },
44
- ]}
45
- >
46
- {/* ---------- Header ---------- */}
47
- <View style={{minHeight: 40,}}>
48
- <View style={{ height: 44, flexDirection: isRTL? "row-reverse": "row", alignItems: "center", gap: 15, justifyContent: "space-between",}}>
49
-
50
- <View style={{flexDirection: isRTL? "row-reverse": "row", alignItems: "center", gap: 15,}}>
51
- {onBack && (
52
- <BackIcon onBack={onBack}/>
53
- )}
54
- <Text
55
- style={{
56
- fontSize: textSize.xl,
57
- fontFamily: Fonts.montserrat.bold,
58
- color: colors.text.primary,
59
- }}
60
- >
61
- {title}
62
- </Text>
63
-
64
- </View>
65
- <TouchableOpacity onPress={onSkip}>
66
- <Text
67
- style={[
68
- styles.skipLabel,
69
- { color: colors.text.primary, textAlign: isRTL ? "left" : "right" },
70
- ]}
71
- >
72
- {skipLabel}
73
- </Text>
74
- </TouchableOpacity>
41
+ <SafeAreaView style={{ flex: 1, backgroundColor: colors.background.main }}>
42
+ <View style={[styles.container, { backgroundColor: colors.background.main }]}>
43
+ {/* ---------- Header ---------- */}
44
+ <View style={{ minHeight: 40 }}>
45
+ <View
46
+ style={{
47
+ minHeight: 44, // was height: 44 — grows with font
48
+ flexDirection: isRTL ? "row-reverse" : "row",
49
+ alignItems: "center",
50
+ gap: 15,
51
+ justifyContent: "space-between",
52
+ }}
53
+ >
54
+ <View
55
+ style={{
56
+ flexDirection: isRTL ? "row-reverse" : "row",
57
+ alignItems: "center",
58
+ gap: 15,
59
+ flexShrink: 1, // lets title truncate if long
60
+ minWidth: 0,
61
+ }}
62
+ >
63
+ {onBack && <BackIcon onBack={onBack} />}
64
+ <Text
65
+ numberOfLines={1}
66
+ style={{
67
+ flexShrink: 1,
68
+ fontSize: textSize.xl,
69
+ fontFamily: Fonts.montserrat.bold,
70
+ color: colors.text.primary,
71
+ }}
72
+ >
73
+ {title}
74
+ </Text>
75
75
  </View>
76
+ <TouchableOpacity onPress={onSkip} hitSlop={8}>
77
+ <Text
78
+ style={[
79
+ styles.skipLabel,
80
+ {
81
+ color: colors.text.primary,
82
+ textAlign: isRTL ? "left" : "right",
83
+ },
84
+ ]}
85
+ >
86
+ {skipLabel}
87
+ </Text>
88
+ </TouchableOpacity>
89
+ </View>
76
90
  </View>
77
91
 
78
- {/* ---------- Content ---------- */}
79
- <View style={styles.content}>
80
- {/* Image */}
81
- <View style={[styles.imageContainer,isRTL && { transform: [{ scaleX: -1 }] }]}>
82
- {image}
83
- </View>
92
+ {/* ---------- Content ---------- */}
93
+ <ScrollView
94
+ style={{ flex: 1 }}
95
+ contentContainerStyle={{ flexGrow: 1, justifyContent: "center" }}
96
+ showsVerticalScrollIndicator={false}
97
+ >
98
+ <View style={styles.content}>
99
+ <View
100
+ style={[
101
+ styles.imageContainer,
102
+ isRTL && { transform: [{ scaleX: -1 }] },
103
+ ]}
104
+ >
105
+ {image}
106
+ </View>
84
107
 
85
- <View style={styles.indicatorContainer}>
86
- <PageIndicator
87
- total={total}
88
- current={currentIndex}
89
- color={colors.primary}
90
- textColor={colors.text.primary}
91
- defaultColor={colors.semantic.border}
92
- stepsLabel={stepsLabel}
93
- />
94
- </View>
95
- {/* Text */}
96
- <Text
97
- style={[
98
- styles.description,
99
- { color: colors.text.secondary,textAlign: isRTL ? "right" : "left", },
100
- ]}
101
- >
102
- {description}
103
- </Text>
104
- </View>
108
+ <View style={styles.indicatorContainer}>
109
+ <PageIndicator
110
+ total={total}
111
+ current={currentIndex}
112
+ color={colors.primary}
113
+ textColor={colors.text.primary}
114
+ defaultColor={colors.semantic.border}
115
+ stepsLabel={stepsLabel}
116
+ />
117
+ </View>
105
118
 
106
- {/* ---------- Footer ---------- */}
119
+ <Text
120
+ style={[
121
+ styles.description,
122
+ {
123
+ color: colors.text.secondary,
124
+ textAlign: isRTL ? "right" : "left",
125
+ },
126
+ ]}
127
+ >
128
+ {description}
129
+ </Text>
130
+ </View>
131
+ </ScrollView>
132
+
133
+ {/* ---------- Footer ---------- */}
107
134
  <SharpButton
108
135
  text={nextLabel}
109
136
  bgColor={colors.primary}
110
137
  onPress={onNext}
111
138
  />
112
- </View>
139
+ </View>
140
+ </SafeAreaView>
113
141
  );
114
142
  }
115
143
 
116
144
  const styles = StyleSheet.create({
117
145
  container: {
118
146
  flex: 1,
119
- paddingHorizontal: 32,
120
- paddingVertical: 60,
147
+ paddingHorizontal: 20, // was 32 — matches the rest of the app
148
+ paddingTop: 16, // SafeAreaView handles the notch
149
+ paddingBottom: 16,
121
150
  },
122
151
 
123
152
  skipLabel: {
@@ -125,8 +154,6 @@ const styles = StyleSheet.create({
125
154
  fontFamily: Fonts.montserrat.regular,
126
155
  },
127
156
 
128
-
129
-
130
157
  content: {
131
158
  flex: 1,
132
159
  justifyContent: "center",
@@ -146,6 +173,4 @@ const styles = StyleSheet.create({
146
173
  marginTop: 10,
147
174
  marginBottom: 25,
148
175
  },
149
-
150
-
151
176
  });
@@ -1,12 +1,10 @@
1
1
  import React from "react";
2
- import { View, Text, ScrollView } from "react-native";
2
+ import { View, Text, useWindowDimensions } from "react-native";
3
3
  import { FieldConfig } from "../../types/validateForm";
4
4
  import { useAppTheme } from "../../context/ThemeContext";
5
5
  import { useLanguage } from "../../context/LanguageContext";
6
6
  import Input from "../ui/input";
7
- import ScreenHeader from "../ui/PageTopBar";
8
7
  import { Fonts, textSize } from "../../tokens/typography";
9
- import SharpButton from "../ui/sharpButton";
10
8
  import TemplateSubPage from "../reusable/templateSubPage";
11
9
 
12
10
  interface Props {
@@ -18,11 +16,11 @@ interface Props {
18
16
  onChangeField: (key: string, value: string) => void;
19
17
  clearError: (key: string) => void;
20
18
  translateError?: (key: string) => string;
21
- phonePrefix?: React.ReactNode; // app passes the flag + 213+
22
- extraCard?: React.ReactNode; // provider only: basePrice, licence, authorisation
23
- footer?: React.ReactNode; // client only: sits above the button
19
+ phonePrefix?: React.ReactNode;
20
+ extraCard?: React.ReactNode;
21
+ footer?: React.ReactNode;
24
22
  button: string;
25
- showButton: boolean; // e.g. isChanged
23
+ showButton: boolean;
26
24
  loading?: boolean;
27
25
  onSubmit: () => void;
28
26
  onBack: () => void;
@@ -38,13 +36,37 @@ const cardStyle = (colors: any) => ({
38
36
  });
39
37
 
40
38
  export default function ProfileLayout({
41
- title, email, fields, formState, errors, onChangeField, clearError, translateError,
42
- phonePrefix, extraCard, footer, button, showButton, loading, onSubmit, onBack,
39
+ title,
40
+ email,
41
+ fields,
42
+ formState,
43
+ errors,
44
+ onChangeField,
45
+ clearError,
46
+ translateError,
47
+ phonePrefix,
48
+ extraCard,
49
+ footer,
50
+ button,
51
+ showButton,
52
+ loading,
53
+ onSubmit,
54
+ onBack,
43
55
  }: Props) {
44
56
  const { colors } = useAppTheme();
45
57
  const { isRTL } = useLanguage();
58
+ const { width } = useWindowDimensions();
59
+
46
60
  const byName = (n: string) => fields.find((f) => f.name === n);
47
61
 
62
+ const firstnameField = byName("firstname");
63
+ const lastnameField = byName("lastname");
64
+ const hasBoth = !!firstnameField && !!lastnameField;
65
+
66
+ // On screens narrower than ~360pt (iPhone SE, small Androids)
67
+ // stack first/last name vertically so inputs aren't too narrow.
68
+ const stackNames = width < 360 || !hasBoth;
69
+
48
70
  const renderInput = (field?: FieldConfig) => {
49
71
  if (!field) return null;
50
72
  return (
@@ -56,9 +78,19 @@ export default function ProfileLayout({
56
78
  onChangeText={(text) => onChangeField(field.name, text)}
57
79
  autoCapitalize="words"
58
80
  returnKeyType="next"
59
- error={errors[field.name] ? (translateError?.(errors[field.name]) ?? errors[field.name]) : ""}
81
+ error={
82
+ errors[field.name]
83
+ ? translateError?.(errors[field.name]) ?? errors[field.name]
84
+ : ""
85
+ }
60
86
  onClearError={() => clearError(field.name)}
61
- keyboardType={field.type === "phone" ? "phone-pad" : field.type === "numeric" ? "numeric" : "default"}
87
+ keyboardType={
88
+ field.type === "phone"
89
+ ? "phone-pad"
90
+ : field.type === "numeric"
91
+ ? "numeric"
92
+ : "default"
93
+ }
62
94
  prefix={field.type === "phone" ? phonePrefix : undefined}
63
95
  borderColor={colors.semantic.border}
64
96
  />
@@ -66,31 +98,51 @@ export default function ProfileLayout({
66
98
  };
67
99
 
68
100
  return (
69
- <TemplateSubPage title={title} text={""} onBack={onBack}>
70
-
71
- <View style={{ gap: 20 }}>
72
- <Text style={{ fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular, color: colors.text.placeholder, textAlign: isRTL ? "right" : "left" }}>
73
- {email}
74
- </Text>
101
+ <TemplateSubPage
102
+ title={title}
103
+ text=""
104
+ onBack={onBack}
105
+ // Use TemplateSubPage's built-in pinned button slot so it
106
+ // stays above the keyboard and doesn't scroll away on small screens.
107
+ buttonText={showButton ? button : undefined}
108
+ handleFunction={onSubmit}
109
+ loading={loading}
110
+ >
111
+ <View style={{ gap: 10 }}>
112
+ <Text
113
+ numberOfLines={1}
114
+ ellipsizeMode="middle"
115
+ style={{
116
+ fontSize: textSize.sm,
117
+ fontFamily: Fonts.montserrat.regular,
118
+ color: colors.text.secondary,
119
+ textAlign: isRTL ? "right" : "left",
120
+ }}
121
+ >
122
+ {email}
123
+ </Text>
75
124
 
76
- <View style={cardStyle(colors)}>
77
- <View style={{ flexDirection: isRTL ? "row-reverse" : "row", gap: 10 }}>
78
- <View style={{ flex: 1 }}>{renderInput(byName("firstname"))}</View>
79
- <View style={{ flex: 1 }}>{renderInput(byName("lastname"))}</View>
80
- </View>
81
- {renderInput(byName("phone"))}
125
+ <View style={cardStyle(colors)}>
126
+ <View
127
+ style={{
128
+ flexDirection: stackNames
129
+ ? "column"
130
+ : isRTL
131
+ ? "row-reverse"
132
+ : "row",
133
+ gap: 10,
134
+ }}
135
+ >
136
+ <View style={{ flex: 1 }}>{renderInput(firstnameField)}</View>
137
+ <View style={{ flex: 1 }}>{renderInput(lastnameField)}</View>
82
138
  </View>
83
-
84
- {extraCard ? <View style={cardStyle(colors)}>{extraCard}</View> : null}
139
+ {renderInput(byName("phone"))}
85
140
  </View>
86
141
 
87
- {footer}
142
+ {extraCard ? <View style={cardStyle(colors)}>{extraCard}</View> : null}
143
+ </View>
88
144
 
89
- {showButton && (
90
- <View style={{ paddingHorizontal: 15 }}>
91
- <SharpButton text={button} textColor={colors.text.primary} bgColor={colors.primary} onPress={onSubmit} loading={loading} />
92
- </View>
93
- )}
94
- </TemplateSubPage>
145
+ {footer}
146
+ </TemplateSubPage>
95
147
  );
96
148
  }