@towsila/expo-ui-library 4.9.0 → 4.9.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towsila/expo-ui-library",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -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,7 +68,7 @@ export default function TextArea({
68
68
  borderColor: error
69
69
  ? colors.semantic.error
70
70
  : colors.text.primary,
71
- borderRadius: 8,
71
+ borderRadius: 12,
72
72
  fontSize: textSize.sm,
73
73
  fontFamily: Fonts.montserrat.regular,
74
74
  color: colors.text.primary,
@@ -89,7 +89,7 @@ export default function TextArea({
89
89
  marginTop: 4,
90
90
  }}
91
91
  >
92
- {value.length} / {maxLength}
92
+ {maxLength} / {value.length}
93
93
  </Text>
94
94
  )}
95
95