@towsila/expo-ui-library 4.9.0 → 4.9.2
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.
package/package.json
CHANGED
|
@@ -23,6 +23,8 @@ interface ReportProps {
|
|
|
23
23
|
selectLabel?:string;
|
|
24
24
|
selectPlaceholder:string;
|
|
25
25
|
t?: (key: string) => string;
|
|
26
|
+
onCancel?:()=>void;
|
|
27
|
+
cancel?:string
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export default function AddReport({
|
|
@@ -38,6 +40,8 @@ export default function AddReport({
|
|
|
38
40
|
selectLabel,
|
|
39
41
|
selectPlaceholder,
|
|
40
42
|
t,
|
|
43
|
+
onCancel,
|
|
44
|
+
cancel
|
|
41
45
|
}: ReportProps) {
|
|
42
46
|
const form = useSubmitReport({ onSubmit });
|
|
43
47
|
const { colors } = useAppTheme();
|
|
@@ -89,13 +93,21 @@ export default function AddReport({
|
|
|
89
93
|
bgColor={colors.background.main}
|
|
90
94
|
showCharCount
|
|
91
95
|
/>
|
|
92
|
-
|
|
96
|
+
<View style={{gap: 10, position: "absolute", left: 0, right:0, bottom: 40}}>
|
|
93
97
|
<SharpButton
|
|
94
98
|
text={submitLabel}
|
|
95
99
|
bgColor={colors.primary}
|
|
96
100
|
onPress={form.handleSubmit}
|
|
97
101
|
loading={form.loading}
|
|
98
102
|
/>
|
|
103
|
+
{cancel && (
|
|
104
|
+
<SharpButton
|
|
105
|
+
text={cancel}
|
|
106
|
+
bgColor={colors.primary}
|
|
107
|
+
onPress={onCancel}
|
|
108
|
+
/>
|
|
109
|
+
)}
|
|
110
|
+
</View>
|
|
99
111
|
</TemplateSubPage>
|
|
100
112
|
);
|
|
101
113
|
}
|
|
@@ -68,11 +68,10 @@ export default function TextArea({
|
|
|
68
68
|
borderColor: error
|
|
69
69
|
? colors.semantic.error
|
|
70
70
|
: colors.text.primary,
|
|
71
|
-
borderRadius:
|
|
71
|
+
borderRadius: 12,
|
|
72
72
|
fontSize: textSize.sm,
|
|
73
73
|
fontFamily: Fonts.montserrat.regular,
|
|
74
74
|
color: colors.text.primary,
|
|
75
|
-
textAlign: isRTL?"left":"right"
|
|
76
75
|
}}
|
|
77
76
|
/>
|
|
78
77
|
|
|
@@ -89,7 +88,7 @@ export default function TextArea({
|
|
|
89
88
|
marginTop: 4,
|
|
90
89
|
}}
|
|
91
90
|
>
|
|
92
|
-
{
|
|
91
|
+
{maxLength} / {value.length}
|
|
93
92
|
</Text>
|
|
94
93
|
)}
|
|
95
94
|
|