@pagopa/io-app-design-system 5.3.9 → 5.4.0
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/README.md +3 -2
- package/lib/commonjs/components/buttons/ButtonLink.js +5 -2
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +20 -15
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +4 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IOButton/IOButton.js +230 -0
- package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -0
- package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js +43 -0
- package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
- package/lib/commonjs/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
- package/lib/commonjs/components/buttons/IOButton/index.js +17 -0
- package/lib/commonjs/components/buttons/IOButton/index.js.map +1 -0
- package/lib/commonjs/components/buttons/IOButton/styles.js +166 -0
- package/lib/commonjs/components/buttons/IOButton/styles.js.map +1 -0
- package/lib/commonjs/components/buttons/IconButton.js +1 -2
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +1 -2
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
- package/lib/commonjs/components/buttons/__test__/button.test.js +0 -24
- package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/commonjs/components/buttons/index.js +11 -0
- package/lib/commonjs/components/buttons/index.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -12
- package/lib/commonjs/components/icons/Icon.js +11 -9
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/layout/FooterActions.js +10 -9
- package/lib/commonjs/components/layout/FooterActions.js.map +1 -1
- package/lib/commonjs/components/layout/FooterActionsInline.js +8 -8
- package/lib/commonjs/components/layout/FooterActionsInline.js.map +1 -1
- package/lib/commonjs/components/layout/GradientBottomActions.js +8 -8
- package/lib/commonjs/components/layout/GradientBottomActions.js.map +1 -1
- package/lib/commonjs/components/layout/GradientScrollView.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js +6 -6
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberButton.js +15 -2
- package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberPad.js +9 -6
- package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +36 -86
- package/lib/commonjs/components/typography/IOText.js +4 -1
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/core/IOStyles.js +2 -17
- package/lib/commonjs/core/IOStyles.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +6 -3
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +21 -16
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +4 -1
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IOButton/IOButton.js +223 -0
- package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -0
- package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js +40 -0
- package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
- package/lib/module/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
- package/lib/module/components/buttons/IOButton/index.js +4 -0
- package/lib/module/components/buttons/IOButton/index.js.map +1 -0
- package/lib/module/components/buttons/IOButton/styles.js +160 -0
- package/lib/module/components/buttons/IOButton/styles.js.map +1 -0
- package/lib/module/components/buttons/IconButton.js +2 -3
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +2 -3
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
- package/lib/module/components/buttons/__test__/button.test.js +0 -24
- package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/module/components/buttons/index.js +1 -0
- package/lib/module/components/buttons/index.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -12
- package/lib/module/components/icons/Icon.js +10 -7
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/layout/FooterActions.js +11 -10
- package/lib/module/components/layout/FooterActions.js.map +1 -1
- package/lib/module/components/layout/FooterActionsInline.js +9 -9
- package/lib/module/components/layout/FooterActionsInline.js.map +1 -1
- package/lib/module/components/layout/GradientBottomActions.js +9 -9
- package/lib/module/components/layout/GradientBottomActions.js.map +1 -1
- package/lib/module/components/layout/GradientScrollView.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +2 -2
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
- package/lib/module/components/loadingSpinner/LoadingSpinner.js +6 -6
- package/lib/module/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/module/components/numberpad/NumberButton.js +16 -3
- package/lib/module/components/numberpad/NumberButton.js.map +1 -1
- package/lib/module/components/numberpad/NumberPad.js +10 -7
- package/lib/module/components/numberpad/NumberPad.js.map +1 -1
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +36 -86
- package/lib/module/components/typography/IOText.js +2 -0
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/core/IOStyles.js +1 -16
- package/lib/module/core/IOStyles.js.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +3 -0
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +3 -0
- package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +3 -0
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts +57 -0
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts +2 -0
- package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IOButton/index.d.ts +2 -0
- package/lib/typescript/components/buttons/IOButton/index.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IOButton/styles.d.ts +35 -0
- package/lib/typescript/components/buttons/IOButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
- package/lib/typescript/components/buttons/index.d.ts +1 -0
- package/lib/typescript/components/buttons/index.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +1 -4
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/types.d.ts +3 -2
- package/lib/typescript/components/icons/types.d.ts.map +1 -1
- package/lib/typescript/components/layout/FooterActions.d.ts +10 -8
- package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
- package/lib/typescript/components/layout/FooterActionsInline.d.ts +5 -4
- package/lib/typescript/components/layout/FooterActionsInline.d.ts.map +1 -1
- package/lib/typescript/components/layout/GradientBottomActions.d.ts +12 -6
- package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +1 -1
- package/lib/typescript/components/layout/GradientScrollView.d.ts.map +1 -1
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts +2 -2
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts +11 -0
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +1 -0
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +0 -14
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/buttons/ButtonLink.tsx +6 -6
- package/src/components/buttons/ButtonOutline.tsx +21 -21
- package/src/components/buttons/ButtonSolid.tsx +4 -1
- package/src/components/buttons/IOButton/IOButton.tsx +363 -0
- package/src/components/buttons/IOButton/__test__/IOButton.test.tsx +46 -0
- package/src/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
- package/src/components/buttons/IOButton/index.tsx +1 -0
- package/src/components/buttons/IOButton/styles.tsx +228 -0
- package/src/components/buttons/IconButton.tsx +3 -6
- package/src/components/buttons/IconButtonContained.tsx +3 -6
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
- package/src/components/buttons/__test__/button.test.tsx +1 -33
- package/src/components/buttons/index.tsx +1 -0
- package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -12
- package/src/components/icons/Icon.tsx +12 -3
- package/src/components/icons/types.ts +3 -2
- package/src/components/layout/FooterActions.tsx +26 -14
- package/src/components/layout/FooterActionsInline.tsx +19 -12
- package/src/components/layout/GradientBottomActions.tsx +17 -18
- package/src/components/layout/GradientScrollView.tsx +2 -1
- package/src/components/listitems/ListItemNav.tsx +1 -1
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
- package/src/components/loadingSpinner/LoadingSpinner.tsx +8 -8
- package/src/components/numberpad/NumberButton.tsx +18 -11
- package/src/components/numberpad/NumberPad.tsx +8 -10
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +36 -86
- package/src/components/typography/IOText.tsx +3 -0
- package/src/core/IOStyles.ts +1 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Fragment, PropsWithChildren, useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
ColorValue,
|
|
5
5
|
LayoutChangeEvent,
|
|
@@ -20,29 +20,39 @@ import {
|
|
|
20
20
|
useIOTheme
|
|
21
21
|
} from "../../core";
|
|
22
22
|
import { WithTestID } from "../../utils/types";
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
IOButton,
|
|
25
|
+
IOButtonBlockSpecificProps,
|
|
26
|
+
IOButtonLinkSpecificProps
|
|
27
|
+
} from "../buttons";
|
|
24
28
|
import { VSpacer } from "../spacer";
|
|
25
29
|
import { useBottomMargins } from "./hooks/useBottomMargins";
|
|
26
30
|
|
|
31
|
+
type IOButtonBlockProps = Omit<
|
|
32
|
+
IOButtonBlockSpecificProps,
|
|
33
|
+
"variant" | "fullWidth"
|
|
34
|
+
>;
|
|
35
|
+
type IOButtonLinkProps = Omit<IOButtonLinkSpecificProps, "variant">;
|
|
36
|
+
|
|
27
37
|
type FooterSingleButton = {
|
|
28
38
|
type: "SingleButton";
|
|
29
|
-
primary:
|
|
39
|
+
primary: IOButtonBlockProps;
|
|
30
40
|
secondary?: never;
|
|
31
41
|
tertiary?: never;
|
|
32
42
|
};
|
|
33
43
|
|
|
34
44
|
type FooterTwoButtons = {
|
|
35
45
|
type: "TwoButtons";
|
|
36
|
-
primary:
|
|
37
|
-
secondary:
|
|
46
|
+
primary: IOButtonBlockProps;
|
|
47
|
+
secondary: IOButtonLinkProps;
|
|
38
48
|
tertiary?: never;
|
|
39
49
|
};
|
|
40
50
|
|
|
41
51
|
type FooterThreeButtons = {
|
|
42
52
|
type: "ThreeButtons";
|
|
43
|
-
primary:
|
|
44
|
-
secondary:
|
|
45
|
-
tertiary:
|
|
53
|
+
primary: IOButtonBlockProps;
|
|
54
|
+
secondary: IOButtonBlockProps;
|
|
55
|
+
tertiary: IOButtonLinkProps;
|
|
46
56
|
};
|
|
47
57
|
|
|
48
58
|
export type FooterActionsMeasurements = {
|
|
@@ -86,9 +96,9 @@ type FooterActionsProps = WithTestID<
|
|
|
86
96
|
}>
|
|
87
97
|
>;
|
|
88
98
|
|
|
89
|
-
/* Margin between
|
|
99
|
+
/* Margin between `solid` and `variant` variant */
|
|
90
100
|
const spaceBetweenActions: IOSpacer = 16;
|
|
91
|
-
/* Margin between
|
|
101
|
+
/* Margin between `solid` and `link` variant */
|
|
92
102
|
const spaceBetweenActionAndLink: IOSpacer = 16;
|
|
93
103
|
|
|
94
104
|
const styles = StyleSheet.create({
|
|
@@ -227,11 +237,13 @@ const renderActions = (
|
|
|
227
237
|
} = actions;
|
|
228
238
|
return (
|
|
229
239
|
<Fragment>
|
|
230
|
-
{primaryAction &&
|
|
240
|
+
{primaryAction && (
|
|
241
|
+
<IOButton variant="solid" fullWidth {...primaryAction} />
|
|
242
|
+
)}
|
|
231
243
|
{type === "TwoButtons" && secondaryAction && (
|
|
232
244
|
<View style={{ alignSelf: "center", marginBottom: extraBottomMargin }}>
|
|
233
245
|
<VSpacer size={spaceBetweenActionAndLink} />
|
|
234
|
-
<
|
|
246
|
+
<IOButton variant="link" {...secondaryAction} />
|
|
235
247
|
</View>
|
|
236
248
|
)}
|
|
237
249
|
{type === "ThreeButtons" && (
|
|
@@ -239,7 +251,7 @@ const renderActions = (
|
|
|
239
251
|
{secondaryAction && (
|
|
240
252
|
<>
|
|
241
253
|
<VSpacer size={spaceBetweenActions} />
|
|
242
|
-
<
|
|
254
|
+
<IOButton variant="outline" fullWidth {...secondaryAction} />
|
|
243
255
|
</>
|
|
244
256
|
)}
|
|
245
257
|
{tertiaryAction && (
|
|
@@ -247,7 +259,7 @@ const renderActions = (
|
|
|
247
259
|
style={{ alignSelf: "center", marginBottom: extraBottomMargin }}
|
|
248
260
|
>
|
|
249
261
|
<VSpacer size={spaceBetweenActionAndLink} />
|
|
250
|
-
<
|
|
262
|
+
<IOButton variant="link" {...tertiaryAction} />
|
|
251
263
|
</View>
|
|
252
264
|
)}
|
|
253
265
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
3
|
import { ColorValue, LayoutChangeEvent, StyleSheet, View } from "react-native";
|
|
4
4
|
import {
|
|
5
5
|
IOColors,
|
|
@@ -11,10 +11,14 @@ import {
|
|
|
11
11
|
useIOThemeContext
|
|
12
12
|
} from "../../core";
|
|
13
13
|
import { WithTestID } from "../../utils/types";
|
|
14
|
-
import {
|
|
15
|
-
import { HSpacer } from "../spacer";
|
|
14
|
+
import { IOButton, IOButtonBlockSpecificProps } from "../buttons";
|
|
16
15
|
import { useBottomMargins } from "./hooks/useBottomMargins";
|
|
17
16
|
|
|
17
|
+
type IOButtonBlockProps = Omit<
|
|
18
|
+
IOButtonBlockSpecificProps,
|
|
19
|
+
"variant" | "fullWidth"
|
|
20
|
+
>;
|
|
21
|
+
|
|
18
22
|
export type FooterActionsInlineMeasurements = {
|
|
19
23
|
/* Height of the safe bottom area. It includes:
|
|
20
24
|
- Margin between screen content
|
|
@@ -29,8 +33,8 @@ export type FooterActionsInlineMeasurements = {
|
|
|
29
33
|
|
|
30
34
|
type FooterActionsInline = WithTestID<
|
|
31
35
|
PropsWithChildren<{
|
|
32
|
-
startAction:
|
|
33
|
-
endAction:
|
|
36
|
+
startAction: IOButtonBlockProps;
|
|
37
|
+
endAction: IOButtonBlockProps;
|
|
34
38
|
onMeasure?: (measurements: FooterActionsInlineMeasurements) => void;
|
|
35
39
|
/* Don't include safe area insets */
|
|
36
40
|
excludeSafeAreaMargins?: boolean;
|
|
@@ -39,9 +43,6 @@ type FooterActionsInline = WithTestID<
|
|
|
39
43
|
}>
|
|
40
44
|
>;
|
|
41
45
|
|
|
42
|
-
/* Margin between ButtonSolid and ButtonOutline */
|
|
43
|
-
const spaceBetweenActions: IOSpacer = 16;
|
|
44
|
-
|
|
45
46
|
const styles = StyleSheet.create({
|
|
46
47
|
buttonContainer: {
|
|
47
48
|
paddingHorizontal: IOVisualCostants.appMarginDefault,
|
|
@@ -76,6 +77,8 @@ export const FooterActionsInline = ({
|
|
|
76
77
|
|
|
77
78
|
const { bottomMargin } = useBottomMargins(false, excludeSafeAreaMargins);
|
|
78
79
|
|
|
80
|
+
/* Margin between `solid` and `outline` variant */
|
|
81
|
+
const spaceBetweenActions: IOSpacer = 16;
|
|
79
82
|
/* Top padding applied above the actions */
|
|
80
83
|
const topSpacingValue: IOSpacingScale = 16;
|
|
81
84
|
const topSpacing = fixed ? topSpacingValue : 0;
|
|
@@ -122,13 +125,17 @@ export const FooterActionsInline = ({
|
|
|
122
125
|
onLayout={getActionBlockMeasurements}
|
|
123
126
|
pointerEvents="box-none"
|
|
124
127
|
>
|
|
125
|
-
<View
|
|
128
|
+
<View
|
|
129
|
+
style={{
|
|
130
|
+
flexDirection: "row",
|
|
131
|
+
gap: spaceBetweenActions
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
126
134
|
<View style={styles.buttonWrapper}>
|
|
127
|
-
<
|
|
135
|
+
<IOButton variant="outline" fullWidth {...startAction} />
|
|
128
136
|
</View>
|
|
129
|
-
<HSpacer size={spaceBetweenActions} />
|
|
130
137
|
<View style={styles.buttonWrapper}>
|
|
131
|
-
<
|
|
138
|
+
<IOButton variant="solid" fullWidth {...endAction} />
|
|
132
139
|
</View>
|
|
133
140
|
</View>
|
|
134
141
|
</View>
|
|
@@ -2,23 +2,24 @@ import * as React from "react";
|
|
|
2
2
|
import { Easing, StyleProp, StyleSheet, View, ViewStyle } from "react-native";
|
|
3
3
|
import { easeGradient } from "react-native-easing-gradient";
|
|
4
4
|
import LinearGradient from "react-native-linear-gradient";
|
|
5
|
-
import Animated from "react-native-reanimated";
|
|
5
|
+
import Animated, { AnimatedStyle } from "react-native-reanimated";
|
|
6
6
|
import { IOColors, IOSpacer, IOVisualCostants, hexToRgba } from "../../core";
|
|
7
7
|
import { WithTestID } from "../../utils/types";
|
|
8
|
-
import {
|
|
9
|
-
ButtonLink,
|
|
10
|
-
ButtonLinkProps,
|
|
11
|
-
ButtonSolid,
|
|
12
|
-
ButtonSolidProps
|
|
13
|
-
} from "../buttons";
|
|
8
|
+
import { IOButton, IOButtonProps } from "../buttons";
|
|
14
9
|
import { VSpacer } from "../spacer";
|
|
15
10
|
|
|
11
|
+
type PrimaryActionProps = Extract<
|
|
12
|
+
IOButtonProps,
|
|
13
|
+
{ variant?: "solid" | "outline" }
|
|
14
|
+
>;
|
|
15
|
+
type SecondaryActionProps = Extract<IOButtonProps, { variant?: "link" }>;
|
|
16
|
+
|
|
16
17
|
export type GradientBottomActions = WithTestID<{
|
|
17
|
-
transitionAnimStyle:
|
|
18
|
+
transitionAnimStyle: AnimatedStyle<StyleProp<ViewStyle>>;
|
|
18
19
|
dimensions: GradientBottomActionsDimensions;
|
|
19
|
-
//
|
|
20
|
-
primaryActionProps?:
|
|
21
|
-
secondaryActionProps?:
|
|
20
|
+
// Button actions
|
|
21
|
+
primaryActionProps?: PrimaryActionProps;
|
|
22
|
+
secondaryActionProps?: SecondaryActionProps;
|
|
22
23
|
// Debug mode
|
|
23
24
|
debugMode?: boolean;
|
|
24
25
|
}>;
|
|
@@ -68,8 +69,8 @@ const styles = StyleSheet.create({
|
|
|
68
69
|
* @see IOScrollView
|
|
69
70
|
*/
|
|
70
71
|
export const GradientBottomActions = ({
|
|
71
|
-
primaryActionProps
|
|
72
|
-
secondaryActionProps
|
|
72
|
+
primaryActionProps,
|
|
73
|
+
secondaryActionProps,
|
|
73
74
|
dimensions,
|
|
74
75
|
transitionAnimStyle,
|
|
75
76
|
debugMode,
|
|
@@ -122,11 +123,9 @@ export const GradientBottomActions = ({
|
|
|
122
123
|
]}
|
|
123
124
|
/>
|
|
124
125
|
<View style={styles.buttonContainer} pointerEvents="box-none">
|
|
125
|
-
{
|
|
126
|
-
<ButtonSolid fullWidth {...primaryAction}></ButtonSolid>
|
|
127
|
-
)}
|
|
126
|
+
{primaryActionProps && <IOButton {...primaryActionProps} fullWidth />}
|
|
128
127
|
|
|
129
|
-
{
|
|
128
|
+
{secondaryActionProps && (
|
|
130
129
|
<View
|
|
131
130
|
style={{
|
|
132
131
|
alignSelf: "center",
|
|
@@ -134,7 +133,7 @@ export const GradientBottomActions = ({
|
|
|
134
133
|
}}
|
|
135
134
|
>
|
|
136
135
|
<VSpacer size={dimensions.spaceBetweenActions} />
|
|
137
|
-
|
|
136
|
+
<IOButton {...secondaryActionProps} />
|
|
138
137
|
</View>
|
|
139
138
|
)}
|
|
140
139
|
</View>
|
|
@@ -21,7 +21,8 @@ export type GradientScrollView = WithTestID<{
|
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
excludeSafeAreaMargins?: boolean;
|
|
23
23
|
debugMode?: boolean;
|
|
24
|
-
// Accepted components:
|
|
24
|
+
// Accepted components: `solid` variant for the primaryAction,
|
|
25
|
+
// `link` variant for the secondaryAction.
|
|
25
26
|
// Don't use any components other than this, please.
|
|
26
27
|
primaryActionProps: GradientBottomActions["primaryActionProps"];
|
|
27
28
|
secondaryActionProps?: GradientBottomActions["secondaryActionProps"];
|
|
@@ -229,7 +229,7 @@ export const ListItemNav = ({
|
|
|
229
229
|
<View style={{ flexGrow: 1, flexShrink: 1 }}>
|
|
230
230
|
{listItemNavContent}
|
|
231
231
|
</View>
|
|
232
|
-
{loading && <LoadingSpinner color={interactiveColor} />}
|
|
232
|
+
{loading && <LoadingSpinner color={IOColors[interactiveColor]} />}
|
|
233
233
|
{!loading && !hideChevron && (
|
|
234
234
|
<Icon
|
|
235
235
|
allowFontScaling
|
|
@@ -321,6 +321,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemInfoCopy Snap
|
|
|
321
321
|
align="xMidYMid"
|
|
322
322
|
bbHeight={24}
|
|
323
323
|
bbWidth={24}
|
|
324
|
+
color="#0B3EE3"
|
|
324
325
|
focusable={false}
|
|
325
326
|
height={24}
|
|
326
327
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -333,9 +334,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemInfoCopy Snap
|
|
|
333
334
|
"backgroundColor": "transparent",
|
|
334
335
|
"borderWidth": 0,
|
|
335
336
|
},
|
|
336
|
-
{
|
|
337
|
-
"color": "#0B3EE3",
|
|
338
|
-
},
|
|
339
337
|
{
|
|
340
338
|
"flex": 0,
|
|
341
339
|
"height": 24,
|
|
@@ -348,7 +346,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemInfoCopy Snap
|
|
|
348
346
|
width={24}
|
|
349
347
|
>
|
|
350
348
|
<RNSVGGroup
|
|
351
|
-
color="#0B3EE3"
|
|
352
349
|
fill={
|
|
353
350
|
{
|
|
354
351
|
"payload": 4278190080,
|
|
@@ -482,6 +479,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemNav Snapshot
|
|
|
482
479
|
align="xMidYMid"
|
|
483
480
|
bbHeight={24}
|
|
484
481
|
bbWidth={24}
|
|
482
|
+
color="#0B3EE3"
|
|
485
483
|
focusable={false}
|
|
486
484
|
height={24}
|
|
487
485
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -494,9 +492,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNav Snapshot
|
|
|
494
492
|
"backgroundColor": "transparent",
|
|
495
493
|
"borderWidth": 0,
|
|
496
494
|
},
|
|
497
|
-
{
|
|
498
|
-
"color": "#0B3EE3",
|
|
499
|
-
},
|
|
500
495
|
{
|
|
501
496
|
"flex": 0,
|
|
502
497
|
"height": 24,
|
|
@@ -509,7 +504,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNav Snapshot
|
|
|
509
504
|
width={24}
|
|
510
505
|
>
|
|
511
506
|
<RNSVGGroup
|
|
512
|
-
color="#0B3EE3"
|
|
513
507
|
fill={
|
|
514
508
|
{
|
|
515
509
|
"payload": 4278190080,
|
|
@@ -619,6 +613,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
|
|
|
619
613
|
align="xMidYMid"
|
|
620
614
|
bbHeight={24}
|
|
621
615
|
bbWidth={24}
|
|
616
|
+
color="#D13333"
|
|
622
617
|
focusable={false}
|
|
623
618
|
height={24}
|
|
624
619
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -631,9 +626,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
|
|
|
631
626
|
"backgroundColor": "transparent",
|
|
632
627
|
"borderWidth": 0,
|
|
633
628
|
},
|
|
634
|
-
{
|
|
635
|
-
"color": "#D13333",
|
|
636
|
-
},
|
|
637
629
|
{
|
|
638
630
|
"flex": 0,
|
|
639
631
|
"height": 24,
|
|
@@ -646,7 +638,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
|
|
|
646
638
|
width={24}
|
|
647
639
|
>
|
|
648
640
|
<RNSVGGroup
|
|
649
|
-
color="#D13333"
|
|
650
641
|
fill={
|
|
651
642
|
{
|
|
652
643
|
"payload": 4278190080,
|
|
@@ -707,6 +698,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
|
|
|
707
698
|
align="xMidYMid"
|
|
708
699
|
bbHeight={24}
|
|
709
700
|
bbWidth={24}
|
|
701
|
+
color="#0B3EE3"
|
|
710
702
|
focusable={false}
|
|
711
703
|
height={24}
|
|
712
704
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -719,9 +711,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
|
|
|
719
711
|
"backgroundColor": "transparent",
|
|
720
712
|
"borderWidth": 0,
|
|
721
713
|
},
|
|
722
|
-
{
|
|
723
|
-
"color": "#0B3EE3",
|
|
724
|
-
},
|
|
725
714
|
{
|
|
726
715
|
"flex": 0,
|
|
727
716
|
"height": 24,
|
|
@@ -734,7 +723,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
|
|
|
734
723
|
width={24}
|
|
735
724
|
>
|
|
736
725
|
<RNSVGGroup
|
|
737
|
-
color="#0B3EE3"
|
|
738
726
|
fill={
|
|
739
727
|
{
|
|
740
728
|
"payload": 4278190080,
|
|
@@ -880,6 +868,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
880
868
|
align="xMidYMid"
|
|
881
869
|
bbHeight={16}
|
|
882
870
|
bbWidth={16}
|
|
871
|
+
color="#5517E3"
|
|
883
872
|
focusable={false}
|
|
884
873
|
height={16}
|
|
885
874
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -892,9 +881,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
892
881
|
"backgroundColor": "transparent",
|
|
893
882
|
"borderWidth": 0,
|
|
894
883
|
},
|
|
895
|
-
{
|
|
896
|
-
"color": "#5517E3",
|
|
897
|
-
},
|
|
898
884
|
{
|
|
899
885
|
"flex": 0,
|
|
900
886
|
"height": 16,
|
|
@@ -907,7 +893,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
907
893
|
width={16}
|
|
908
894
|
>
|
|
909
895
|
<RNSVGGroup
|
|
910
|
-
color="#5517E3"
|
|
911
896
|
fill={
|
|
912
897
|
{
|
|
913
898
|
"payload": 4278190080,
|
|
@@ -1864,6 +1849,7 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
|
|
|
1864
1849
|
align="xMidYMid"
|
|
1865
1850
|
bbHeight={24}
|
|
1866
1851
|
bbWidth={24}
|
|
1852
|
+
color="#0B3EE3"
|
|
1867
1853
|
focusable={false}
|
|
1868
1854
|
height={24}
|
|
1869
1855
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -1876,9 +1862,6 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
|
|
|
1876
1862
|
"backgroundColor": "transparent",
|
|
1877
1863
|
"borderWidth": 0,
|
|
1878
1864
|
},
|
|
1879
|
-
{
|
|
1880
|
-
"color": "#0B3EE3",
|
|
1881
|
-
},
|
|
1882
1865
|
{
|
|
1883
1866
|
"flex": 0,
|
|
1884
1867
|
"height": 24,
|
|
@@ -1891,7 +1874,6 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
|
|
|
1891
1874
|
width={24}
|
|
1892
1875
|
>
|
|
1893
1876
|
<RNSVGGroup
|
|
1894
|
-
color="#0B3EE3"
|
|
1895
1877
|
fill={
|
|
1896
1878
|
{
|
|
1897
1879
|
"payload": 4278190080,
|
|
@@ -2025,6 +2007,7 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
|
|
|
2025
2007
|
align="xMidYMid"
|
|
2026
2008
|
bbHeight={24}
|
|
2027
2009
|
bbWidth={24}
|
|
2010
|
+
color="#0B3EE3"
|
|
2028
2011
|
focusable={false}
|
|
2029
2012
|
height={24}
|
|
2030
2013
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -2037,9 +2020,6 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
|
|
|
2037
2020
|
"backgroundColor": "transparent",
|
|
2038
2021
|
"borderWidth": 0,
|
|
2039
2022
|
},
|
|
2040
|
-
{
|
|
2041
|
-
"color": "#0B3EE3",
|
|
2042
|
-
},
|
|
2043
2023
|
{
|
|
2044
2024
|
"flex": 0,
|
|
2045
2025
|
"height": 24,
|
|
@@ -2052,7 +2032,6 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
|
|
|
2052
2032
|
width={24}
|
|
2053
2033
|
>
|
|
2054
2034
|
<RNSVGGroup
|
|
2055
|
-
color="#0B3EE3"
|
|
2056
2035
|
fill={
|
|
2057
2036
|
{
|
|
2058
2037
|
"payload": 4278190080,
|
|
@@ -2162,6 +2141,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2162
2141
|
align="xMidYMid"
|
|
2163
2142
|
bbHeight={24}
|
|
2164
2143
|
bbWidth={24}
|
|
2144
|
+
color="#D13333"
|
|
2165
2145
|
focusable={false}
|
|
2166
2146
|
height={24}
|
|
2167
2147
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -2174,9 +2154,6 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2174
2154
|
"backgroundColor": "transparent",
|
|
2175
2155
|
"borderWidth": 0,
|
|
2176
2156
|
},
|
|
2177
|
-
{
|
|
2178
|
-
"color": "#D13333",
|
|
2179
|
-
},
|
|
2180
2157
|
{
|
|
2181
2158
|
"flex": 0,
|
|
2182
2159
|
"height": 24,
|
|
@@ -2189,7 +2166,6 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2189
2166
|
width={24}
|
|
2190
2167
|
>
|
|
2191
2168
|
<RNSVGGroup
|
|
2192
|
-
color="#D13333"
|
|
2193
2169
|
fill={
|
|
2194
2170
|
{
|
|
2195
2171
|
"payload": 4278190080,
|
|
@@ -2250,6 +2226,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2250
2226
|
align="xMidYMid"
|
|
2251
2227
|
bbHeight={24}
|
|
2252
2228
|
bbWidth={24}
|
|
2229
|
+
color="#0B3EE3"
|
|
2253
2230
|
focusable={false}
|
|
2254
2231
|
height={24}
|
|
2255
2232
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -2262,9 +2239,6 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2262
2239
|
"backgroundColor": "transparent",
|
|
2263
2240
|
"borderWidth": 0,
|
|
2264
2241
|
},
|
|
2265
|
-
{
|
|
2266
|
-
"color": "#0B3EE3",
|
|
2267
|
-
},
|
|
2268
2242
|
{
|
|
2269
2243
|
"flex": 0,
|
|
2270
2244
|
"height": 24,
|
|
@@ -2277,7 +2251,6 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2277
2251
|
width={24}
|
|
2278
2252
|
>
|
|
2279
2253
|
<RNSVGGroup
|
|
2280
|
-
color="#0B3EE3"
|
|
2281
2254
|
fill={
|
|
2282
2255
|
{
|
|
2283
2256
|
"payload": 4278190080,
|
|
@@ -2423,6 +2396,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2423
2396
|
align="xMidYMid"
|
|
2424
2397
|
bbHeight={16}
|
|
2425
2398
|
bbWidth={16}
|
|
2399
|
+
color="#5517E3"
|
|
2426
2400
|
focusable={false}
|
|
2427
2401
|
height={16}
|
|
2428
2402
|
importantForAccessibility="no-hide-descendants"
|
|
@@ -2435,9 +2409,6 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2435
2409
|
"backgroundColor": "transparent",
|
|
2436
2410
|
"borderWidth": 0,
|
|
2437
2411
|
},
|
|
2438
|
-
{
|
|
2439
|
-
"color": "#5517E3",
|
|
2440
|
-
},
|
|
2441
2412
|
{
|
|
2442
2413
|
"flex": 0,
|
|
2443
2414
|
"height": 16,
|
|
@@ -2450,7 +2421,6 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2450
2421
|
width={16}
|
|
2451
2422
|
>
|
|
2452
2423
|
<RNSVGGroup
|
|
2453
|
-
color="#5517E3"
|
|
2454
2424
|
fill={
|
|
2455
2425
|
{
|
|
2456
2426
|
"payload": 4278190080,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from "react";
|
|
2
|
-
import { View, Animated, Easing } from "react-native";
|
|
2
|
+
import { View, Animated, Easing, ColorValue } from "react-native";
|
|
3
3
|
import Svg, { Defs, G, LinearGradient, Path, Stop } from "react-native-svg";
|
|
4
4
|
import { WithTestID } from "../../utils/types";
|
|
5
5
|
import { IOColors, useIOTheme } from "../../core";
|
|
6
6
|
|
|
7
7
|
export type LoadingSpinner = WithTestID<{
|
|
8
|
-
color?:
|
|
8
|
+
color?: ColorValue;
|
|
9
9
|
size?: IOLoadingSpinnerSizeScale;
|
|
10
10
|
durationMs?: number;
|
|
11
11
|
accessibilityLabel?: string;
|
|
@@ -36,7 +36,7 @@ export const LoadingSpinner = ({
|
|
|
36
36
|
const rotationDegree = useRef(new Animated.Value(0)).current;
|
|
37
37
|
const stroke: number = strokeMap[size];
|
|
38
38
|
|
|
39
|
-
const color = customColor ?? theme["interactiveElem-default"];
|
|
39
|
+
const color = customColor ?? IOColors[theme["interactiveElem-default"]];
|
|
40
40
|
|
|
41
41
|
useEffect(() => {
|
|
42
42
|
const animation = Animated.loop(
|
|
@@ -87,12 +87,12 @@ export const LoadingSpinner = ({
|
|
|
87
87
|
>
|
|
88
88
|
<Defs>
|
|
89
89
|
<LinearGradient id="spinner-secondHalf">
|
|
90
|
-
<Stop offset="0%" stopOpacity="0" stopColor={
|
|
91
|
-
<Stop offset="100%" stopOpacity="1" stopColor={
|
|
90
|
+
<Stop offset="0%" stopOpacity="0" stopColor={color} />
|
|
91
|
+
<Stop offset="100%" stopOpacity="1" stopColor={color} />
|
|
92
92
|
</LinearGradient>
|
|
93
93
|
<LinearGradient id="spinner-firstHalf">
|
|
94
|
-
<Stop offset="0%" stopOpacity="1" stopColor={
|
|
95
|
-
<Stop offset="100%" stopOpacity="1" stopColor={
|
|
94
|
+
<Stop offset="0%" stopOpacity="1" stopColor={color} />
|
|
95
|
+
<Stop offset="100%" stopOpacity="1" stopColor={color} />
|
|
96
96
|
</LinearGradient>
|
|
97
97
|
</Defs>
|
|
98
98
|
|
|
@@ -110,7 +110,7 @@ export const LoadingSpinner = ({
|
|
|
110
110
|
} ${size / 2 - stroke / 2} 0 0 1 ${stroke / 2} ${size / 2}`}
|
|
111
111
|
/>
|
|
112
112
|
<Path
|
|
113
|
-
stroke={
|
|
113
|
+
stroke={color}
|
|
114
114
|
strokeLinecap="round"
|
|
115
115
|
d={`M ${stroke / 2} ${size / 2} A ${size / 2 - stroke / 2} ${
|
|
116
116
|
size / 2 - stroke / 2
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import React, { memo, useCallback, useMemo } from "react";
|
|
2
|
-
import { Pressable } from "react-native";
|
|
2
|
+
import { Pressable, StyleSheet } from "react-native";
|
|
3
3
|
import ReactNativeHapticFeedback from "react-native-haptic-feedback";
|
|
4
4
|
import Animated, {
|
|
5
5
|
interpolateColor,
|
|
6
6
|
useAnimatedStyle,
|
|
7
7
|
useReducedMotion
|
|
8
8
|
} from "react-native-reanimated";
|
|
9
|
-
import {
|
|
10
|
-
hexToRgba,
|
|
11
|
-
IOColors,
|
|
12
|
-
IONumberPadButtonStyles,
|
|
13
|
-
useIONewTypeface,
|
|
14
|
-
useIOTheme
|
|
15
|
-
} from "../../core";
|
|
9
|
+
import { hexToRgba, IOColors, useIONewTypeface, useIOTheme } from "../../core";
|
|
16
10
|
import { useScaleAnimation } from "../../hooks";
|
|
17
11
|
import { IOText } from "../typography";
|
|
18
12
|
|
|
@@ -41,6 +35,8 @@ type ColorMapVariant = {
|
|
|
41
35
|
foreground: IOColors;
|
|
42
36
|
};
|
|
43
37
|
|
|
38
|
+
const numberPadBtnSize: number = 56;
|
|
39
|
+
|
|
44
40
|
/**
|
|
45
41
|
* Based on a `Pressable` element, it displays a number button with animations on press In and Out.
|
|
46
42
|
*
|
|
@@ -98,9 +94,8 @@ export const NumberButton = memo(
|
|
|
98
94
|
>
|
|
99
95
|
<Animated.View
|
|
100
96
|
style={[
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
IONumberPadButtonStyles.buttonSize,
|
|
97
|
+
numberButtonStyles.circularButton,
|
|
98
|
+
numberButtonStyles.buttonSize,
|
|
104
99
|
pressedAnimationStyle,
|
|
105
100
|
!reducedMotion && scaleAnimatedStyle
|
|
106
101
|
]}
|
|
@@ -122,3 +117,15 @@ export const NumberButton = memo(
|
|
|
122
117
|
);
|
|
123
118
|
}
|
|
124
119
|
);
|
|
120
|
+
|
|
121
|
+
export const numberButtonStyles = StyleSheet.create({
|
|
122
|
+
circularButton: {
|
|
123
|
+
alignItems: "center",
|
|
124
|
+
justifyContent: "center",
|
|
125
|
+
borderRadius: numberPadBtnSize / 2
|
|
126
|
+
},
|
|
127
|
+
buttonSize: {
|
|
128
|
+
width: numberPadBtnSize,
|
|
129
|
+
height: numberPadBtnSize
|
|
130
|
+
}
|
|
131
|
+
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { ComponentProps, useCallback, useMemo } from "react";
|
|
2
2
|
import { StyleSheet, View } from "react-native";
|
|
3
|
-
import { IONumberPadButtonStyles, IOStyles } from "../../core";
|
|
4
3
|
import { BiometricsValidType, Optional } from "../../utils/types";
|
|
5
4
|
import { IconButton } from "../buttons";
|
|
5
|
+
import { ContentWrapper } from "../contentWrapper";
|
|
6
6
|
import { IOIconSizeScale, IOIcons } from "../icons";
|
|
7
7
|
import { VStack } from "../stack";
|
|
8
|
-
import { NumberButton } from "./NumberButton";
|
|
8
|
+
import { NumberButton, numberButtonStyles } from "./NumberButton";
|
|
9
9
|
|
|
10
10
|
type BiometricAuthProps =
|
|
11
11
|
| {
|
|
@@ -122,9 +122,7 @@ export const NumberPad = ({
|
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
return
|
|
126
|
-
<View key={"emptyElem"} style={IONumberPadButtonStyles.buttonSize} />
|
|
127
|
-
);
|
|
125
|
+
return <View key={"emptyElem"} style={numberButtonStyles.buttonSize} />;
|
|
128
126
|
}),
|
|
129
127
|
[
|
|
130
128
|
biometricAccessibilityLabel,
|
|
@@ -147,7 +145,7 @@ export const NumberPad = ({
|
|
|
147
145
|
[7, 8, 9],
|
|
148
146
|
[biometricType, 0, "delete"]
|
|
149
147
|
].map((row, i) => (
|
|
150
|
-
<View key={i} style={
|
|
148
|
+
<View key={i} style={styles.numberPad}>
|
|
151
149
|
{renderButtonsRow(row)}
|
|
152
150
|
</View>
|
|
153
151
|
))}
|
|
@@ -156,15 +154,14 @@ export const NumberPad = ({
|
|
|
156
154
|
[biometricType, renderButtonsRow]
|
|
157
155
|
);
|
|
158
156
|
|
|
159
|
-
return <
|
|
157
|
+
return <ContentWrapper>{numberPad}</ContentWrapper>;
|
|
160
158
|
};
|
|
161
159
|
|
|
162
160
|
const ButtonWrapper = ({ children }: { children: React.ReactNode }) => (
|
|
163
161
|
<View
|
|
164
162
|
style={[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
IOStyles.centerJustified
|
|
163
|
+
numberButtonStyles.buttonSize,
|
|
164
|
+
{ alignItems: "center", justifyContent: "center" }
|
|
168
165
|
]}
|
|
169
166
|
>
|
|
170
167
|
{children}
|
|
@@ -173,6 +170,7 @@ const ButtonWrapper = ({ children }: { children: React.ReactNode }) => (
|
|
|
173
170
|
|
|
174
171
|
const styles = StyleSheet.create({
|
|
175
172
|
numberPad: {
|
|
173
|
+
flexDirection: "row",
|
|
176
174
|
justifyContent: "space-between",
|
|
177
175
|
alignItems: "center",
|
|
178
176
|
flexGrow: 1
|