@lookiero/checkout 6.5.0-beta.3 → 6.5.0-beta.4
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/dist/src/infrastructure/ui/views/checkout/Checkout.js +25 -17
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +8 -0
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +10 -2
- package/dist/src/infrastructure/ui/views/item/Item.js +1 -1
- package/dist/src/infrastructure/ui/views/item/Item.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/item/Item.style.js +3 -0
- package/dist/src/infrastructure/ui/views/summary/Summary.js +1 -0
- package/dist/src/infrastructure/ui/views/summary/Summary.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/summary/Summary.style.js +6 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +10 -2
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +68 -45
- package/src/infrastructure/ui/views/item/Item.style.ts +3 -0
- package/src/infrastructure/ui/views/item/Item.tsx +1 -1
- package/src/infrastructure/ui/views/summary/Summary.style.ts +5 -2
- package/src/infrastructure/ui/views/summary/Summary.tsx +1 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { useCallback, useMemo } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
1
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
2
|
+
import { Platform, ScrollView, View } from "react-native";
|
|
3
3
|
import { useNavigate } from "react-router-native";
|
|
4
4
|
import { Box, Button, Layout, Spinner, Text, useDevice } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
+
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
7
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
8
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
9
10
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -11,6 +12,7 @@ import { TrackingPage } from "../../../tracking/tracking";
|
|
|
11
12
|
import { useTrackPageView } from "../../../tracking/useTrackPageView";
|
|
12
13
|
import { useTrackPressBack } from "../../../tracking/useTrackPressBack";
|
|
13
14
|
import { useTrackPressContinue } from "../../../tracking/useTrackPressContinue";
|
|
15
|
+
import { Body } from "../../components/layouts/body/Body";
|
|
14
16
|
import { CheckoutHeader } from "../../components/templates/header/checkoutHeader/CheckoutHeader";
|
|
15
17
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
16
18
|
import { I18nMessages } from "../../i18n/i18n";
|
|
@@ -26,6 +28,8 @@ const Checkout = ({ children, layout: LocalLayout, useRedirect }) => {
|
|
|
26
28
|
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
27
29
|
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
28
30
|
const { screen } = useDevice();
|
|
31
|
+
const [pricingHeight, setPricingHeight] = useState(0);
|
|
32
|
+
const handleOnPricingLayout = useCallback(({ height }) => setPricingHeight(height), []);
|
|
29
33
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
30
34
|
const [pricing, pricingStatus] = useViewPricingByCheckoutId({ checkoutId: checkout?.id });
|
|
31
35
|
useTrackPageView({
|
|
@@ -64,23 +68,27 @@ const Checkout = ({ children, layout: LocalLayout, useRedirect }) => {
|
|
|
64
68
|
if (!dependenciesLoaded) {
|
|
65
69
|
return React.createElement(Spinner, null);
|
|
66
70
|
}
|
|
67
|
-
return (React.createElement(LocalLayout, { header: React.createElement(CheckoutHeader, { onBack: handleOnBack }), style: {
|
|
71
|
+
return (React.createElement(LocalLayout, { header: React.createElement(CheckoutHeader, { onBack: handleOnBack }), scrollEnabled: false, style: {
|
|
68
72
|
scrollView: style.scrollView,
|
|
69
73
|
} },
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
React.createElement(
|
|
73
|
-
React.createElement(
|
|
74
|
-
React.createElement(
|
|
75
|
-
|
|
76
|
-
React.createElement(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
React.createElement(
|
|
81
|
-
|
|
82
|
-
React.createElement(
|
|
83
|
-
|
|
74
|
+
React.createElement(ScrollView, { showsVerticalScrollIndicator: false },
|
|
75
|
+
hasReplacedCheckoutItem && React.createElement(DeliveryBanner, null),
|
|
76
|
+
React.createElement(Layout, { fullWidth: !screen.L, style: [screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }] },
|
|
77
|
+
React.createElement(Box, { size: { L: "2/3" }, style: screen.L && style.desktopListSpacing },
|
|
78
|
+
React.createElement(View, { style: [style.contentWrapper, screen.L && style.desktopContentWrapper] },
|
|
79
|
+
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
80
|
+
checkoutItemsKept?.map((checkoutItem) => (React.createElement(View, { key: checkoutItem.id, testID: "checkout-items-kept" },
|
|
81
|
+
React.createElement(ProductVariant, { brand: checkoutItem.productVariant.brand, color: checkoutItem.productVariant.color, country: country, media: checkoutItem.productVariant.media, name: checkoutItem.productVariant.name, price: checkoutItem.price, status: checkoutItem.status, size: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
82
|
+
? checkoutItem.replacedFor.size
|
|
83
|
+
: checkoutItem.productVariant.size })))),
|
|
84
|
+
React.createElement(View, { style: style.paymentSelector },
|
|
85
|
+
React.createElement(PaymentInstrument, { useRedirect: useRedirect })))),
|
|
86
|
+
React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, screen.L && style.desktopResume] }, pricing ? (React.createElement(View, { style: [style.princingWrapper, !screen.L && style.princingWrapperSmall] },
|
|
87
|
+
React.createElement(Pricing, { pricing: pricing, totalCheckoutItemsKept: checkoutItemsKept?.length || 0 }),
|
|
88
|
+
screen.L ? (React.createElement(Button, { testID: "confirm-checkout-button", onPress: handleOnSubmit }, submitButtonText)) : null)) : null))),
|
|
89
|
+
pricing && !screen.L ? (React.createElement(Sticky, { style: style.sticky, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined },
|
|
90
|
+
React.createElement(Body, null,
|
|
91
|
+
React.createElement(Button, { testID: "confirm-checkout-button", small: true, onPress: handleOnSubmit }, submitButtonText)))) : null,
|
|
84
92
|
children));
|
|
85
93
|
};
|
|
86
94
|
export { Checkout };
|
|
@@ -24,9 +24,17 @@ declare const style: {
|
|
|
24
24
|
princingWrapper: {
|
|
25
25
|
padding: number;
|
|
26
26
|
};
|
|
27
|
+
princingWrapperSmall: {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
};
|
|
27
30
|
resume: any;
|
|
28
31
|
scrollView: {
|
|
29
32
|
backgroundColor: string;
|
|
33
|
+
flex: number;
|
|
34
|
+
};
|
|
35
|
+
sticky: {
|
|
36
|
+
paddingBottom: number;
|
|
37
|
+
paddingTop: number;
|
|
30
38
|
};
|
|
31
39
|
title: {
|
|
32
40
|
marginBottom: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet, Platform } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space4, space6, space12, space16
|
|
3
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
5
|
contentWrapper: {
|
|
6
6
|
backgroundColor: colorBgBase,
|
|
@@ -27,13 +27,16 @@ const style = StyleSheet.create({
|
|
|
27
27
|
princingWrapper: {
|
|
28
28
|
padding: space6,
|
|
29
29
|
},
|
|
30
|
+
princingWrapperSmall: {
|
|
31
|
+
backgroundColor: colorBgPrimaryLight,
|
|
32
|
+
},
|
|
30
33
|
resume: {
|
|
31
34
|
overflow: "hidden",
|
|
32
35
|
backgroundColor: colorBgBase,
|
|
33
36
|
...Platform.select({
|
|
34
37
|
web: {
|
|
35
38
|
position: "sticky",
|
|
36
|
-
top:
|
|
39
|
+
top: space12,
|
|
37
40
|
alignSelf: "flex-start",
|
|
38
41
|
},
|
|
39
42
|
}),
|
|
@@ -41,6 +44,11 @@ const style = StyleSheet.create({
|
|
|
41
44
|
},
|
|
42
45
|
scrollView: {
|
|
43
46
|
backgroundColor: colorBgPrimaryLight,
|
|
47
|
+
flex: 1,
|
|
48
|
+
},
|
|
49
|
+
sticky: {
|
|
50
|
+
paddingBottom: space4,
|
|
51
|
+
paddingTop: space3,
|
|
44
52
|
},
|
|
45
53
|
title: {
|
|
46
54
|
marginBottom: space4,
|
|
@@ -170,7 +170,7 @@ const Item = ({ layout: Layout }) => {
|
|
|
170
170
|
}
|
|
171
171
|
return (React.createElement(ReturnQuestionFeedbackProvider, { key: checkoutItem.id, feedback: checkoutItem.feedbacks || {} },
|
|
172
172
|
React.createElement(Layout, { header: header, scrollEnabled: !itemWithoutCustomerDecission, style: {
|
|
173
|
-
header: fiveItemsDiscount !== 0
|
|
173
|
+
header: fiveItemsDiscount !== 0 ? style.headerWithDoubleHeight : style.header,
|
|
174
174
|
scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
|
|
175
175
|
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
176
176
|
} }, itemWithoutCustomerDecission ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, onReturn: redirectToReturnPage ? goToReturnPage : showReturnQuestions })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: redirectToReturnPage ? goToReturnPage : showReturnQuestions }))),
|
|
@@ -80,6 +80,7 @@ const Summary = ({ layout: LocalLayout, children }) => {
|
|
|
80
80
|
return React.createElement(Spinner, null);
|
|
81
81
|
}
|
|
82
82
|
return (React.createElement(LocalLayout, { scrollEnabled: false, style: {
|
|
83
|
+
header: style.header,
|
|
83
84
|
scrollView: style.scrollView,
|
|
84
85
|
} },
|
|
85
86
|
React.createElement(ScrollView, { showsVerticalScrollIndicator: false },
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
|
|
3
|
+
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
|
+
const { colorTextMedium, colorText, colorBgPrimaryLight, space2, space3, space4, space6, space12, space16, borderRadius4, colorBgBase, } = theme();
|
|
4
5
|
const style = StyleSheet.create({
|
|
5
6
|
contentWrapper: {
|
|
6
7
|
backgroundColor: colorBgBase,
|
|
@@ -24,6 +25,9 @@ const style = StyleSheet.create({
|
|
|
24
25
|
desktopResume: {
|
|
25
26
|
borderRadius: borderRadius4,
|
|
26
27
|
},
|
|
28
|
+
header: {
|
|
29
|
+
height: HEADER_HEIGHT,
|
|
30
|
+
},
|
|
27
31
|
mobileInfo: {
|
|
28
32
|
paddingHorizontal: space6,
|
|
29
33
|
paddingTop: space6,
|
|
@@ -49,7 +53,7 @@ const style = StyleSheet.create({
|
|
|
49
53
|
...Platform.select({
|
|
50
54
|
web: {
|
|
51
55
|
position: "sticky",
|
|
52
|
-
top:
|
|
56
|
+
top: space12,
|
|
53
57
|
alignSelf: "flex-start",
|
|
54
58
|
},
|
|
55
59
|
}),
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "6.5.0-beta.
|
|
1
|
+
export declare const VERSION = "6.5.0-beta.4";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "6.5.0-beta.
|
|
1
|
+
export const VERSION = "6.5.0-beta.4";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet, Platform } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
|
|
4
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space4, space6, space12, space16
|
|
4
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
5
5
|
|
|
6
6
|
const style = StyleSheet.create({
|
|
7
7
|
contentWrapper: {
|
|
@@ -29,13 +29,16 @@ const style = StyleSheet.create({
|
|
|
29
29
|
princingWrapper: {
|
|
30
30
|
padding: space6,
|
|
31
31
|
},
|
|
32
|
+
princingWrapperSmall: {
|
|
33
|
+
backgroundColor: colorBgPrimaryLight,
|
|
34
|
+
},
|
|
32
35
|
resume: {
|
|
33
36
|
overflow: "hidden",
|
|
34
37
|
backgroundColor: colorBgBase,
|
|
35
38
|
...Platform.select({
|
|
36
39
|
web: {
|
|
37
40
|
position: "sticky",
|
|
38
|
-
top:
|
|
41
|
+
top: space12,
|
|
39
42
|
alignSelf: "flex-start",
|
|
40
43
|
},
|
|
41
44
|
}),
|
|
@@ -43,6 +46,11 @@ const style = StyleSheet.create({
|
|
|
43
46
|
} as any,
|
|
44
47
|
scrollView: {
|
|
45
48
|
backgroundColor: colorBgPrimaryLight,
|
|
49
|
+
flex: 1,
|
|
50
|
+
},
|
|
51
|
+
sticky: {
|
|
52
|
+
paddingBottom: space4,
|
|
53
|
+
paddingTop: space3,
|
|
46
54
|
},
|
|
47
55
|
title: {
|
|
48
56
|
marginBottom: space4,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { FC, ReactNode, useCallback, useMemo } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
1
|
+
import React, { FC, ReactNode, useCallback, useMemo, useState } from "react";
|
|
2
|
+
import { LayoutRectangle, Platform, ScrollView, View } from "react-native";
|
|
3
3
|
import { useNavigate } from "react-router-native";
|
|
4
4
|
import { Box, Button, Layout, Spinner, Text, useDevice } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
-
import { Layout as LocalLayout } from "@lookiero/sty-psp-ui";
|
|
7
|
+
import { Layout as LocalLayout, Sticky } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
10
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -12,6 +12,7 @@ import { TrackingPage } from "../../../tracking/tracking";
|
|
|
12
12
|
import { useTrackPageView } from "../../../tracking/useTrackPageView";
|
|
13
13
|
import { useTrackPressBack } from "../../../tracking/useTrackPressBack";
|
|
14
14
|
import { useTrackPressContinue } from "../../../tracking/useTrackPressContinue";
|
|
15
|
+
import { Body } from "../../components/layouts/body/Body";
|
|
15
16
|
import { CheckoutHeader } from "../../components/templates/header/checkoutHeader/CheckoutHeader";
|
|
16
17
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
17
18
|
import { I18nMessages } from "../../i18n/i18n";
|
|
@@ -36,6 +37,8 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
36
37
|
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
37
38
|
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
38
39
|
const { screen } = useDevice();
|
|
40
|
+
const [pricingHeight, setPricingHeight] = useState(0);
|
|
41
|
+
const handleOnPricingLayout = useCallback(({ height }: LayoutRectangle) => setPricingHeight(height), []);
|
|
39
42
|
|
|
40
43
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
41
44
|
const [pricing, pricingStatus] = useViewPricingByCheckoutId({ checkoutId: checkout?.id as string });
|
|
@@ -98,54 +101,74 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
98
101
|
return (
|
|
99
102
|
<LocalLayout
|
|
100
103
|
header={<CheckoutHeader onBack={handleOnBack} />}
|
|
104
|
+
scrollEnabled={false}
|
|
101
105
|
style={{
|
|
102
106
|
scrollView: style.scrollView,
|
|
103
107
|
}}
|
|
104
108
|
>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
checkoutItem.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
109
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
110
|
+
{hasReplacedCheckoutItem && <DeliveryBanner />}
|
|
111
|
+
|
|
112
|
+
<Layout
|
|
113
|
+
fullWidth={!screen.L}
|
|
114
|
+
style={[screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }]}
|
|
115
|
+
>
|
|
116
|
+
<Box size={{ L: "2/3" }} style={screen.L && style.desktopListSpacing}>
|
|
117
|
+
<View style={[style.contentWrapper, screen.L && style.desktopContentWrapper]}>
|
|
118
|
+
<Text level={3} style={style.title} heading>
|
|
119
|
+
{titleText}
|
|
120
|
+
</Text>
|
|
121
|
+
|
|
122
|
+
{checkoutItemsKept?.map((checkoutItem) => (
|
|
123
|
+
<View key={checkoutItem.id} testID="checkout-items-kept">
|
|
124
|
+
<ProductVariant
|
|
125
|
+
brand={checkoutItem.productVariant.brand}
|
|
126
|
+
color={checkoutItem.productVariant.color}
|
|
127
|
+
country={country}
|
|
128
|
+
media={checkoutItem.productVariant.media}
|
|
129
|
+
name={checkoutItem.productVariant.name}
|
|
130
|
+
price={checkoutItem.price}
|
|
131
|
+
status={checkoutItem.status}
|
|
132
|
+
size={
|
|
133
|
+
checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
134
|
+
? checkoutItem.replacedFor.size
|
|
135
|
+
: checkoutItem.productVariant.size
|
|
136
|
+
}
|
|
137
|
+
/>
|
|
138
|
+
</View>
|
|
139
|
+
))}
|
|
140
|
+
|
|
141
|
+
<View style={style.paymentSelector}>
|
|
142
|
+
<PaymentInstrument useRedirect={useRedirect} />
|
|
129
143
|
</View>
|
|
130
|
-
))}
|
|
131
|
-
|
|
132
|
-
<View style={style.paymentSelector}>
|
|
133
|
-
<PaymentInstrument useRedirect={useRedirect} />
|
|
134
|
-
</View>
|
|
135
|
-
</View>
|
|
136
|
-
</Box>
|
|
137
|
-
|
|
138
|
-
<Box size={{ L: "1/3" }} style={[style.resume, screen.L && style.desktopResume]}>
|
|
139
|
-
{pricing ? (
|
|
140
|
-
<View style={style.princingWrapper}>
|
|
141
|
-
<Pricing pricing={pricing} totalCheckoutItemsKept={checkoutItemsKept?.length || 0} />
|
|
142
|
-
<Button testID="confirm-checkout-button" onPress={handleOnSubmit}>
|
|
143
|
-
{submitButtonText}
|
|
144
|
-
</Button>
|
|
145
144
|
</View>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
</Box>
|
|
146
|
+
|
|
147
|
+
<Box size={{ L: "1/3" }} style={[style.resume, screen.L && style.desktopResume]}>
|
|
148
|
+
{pricing ? (
|
|
149
|
+
<View style={[style.princingWrapper, !screen.L && style.princingWrapperSmall]}>
|
|
150
|
+
<Pricing pricing={pricing} totalCheckoutItemsKept={checkoutItemsKept?.length || 0} />
|
|
151
|
+
|
|
152
|
+
{screen.L ? (
|
|
153
|
+
<Button testID="confirm-checkout-button" onPress={handleOnSubmit}>
|
|
154
|
+
{submitButtonText}
|
|
155
|
+
</Button>
|
|
156
|
+
) : null}
|
|
157
|
+
</View>
|
|
158
|
+
) : null}
|
|
159
|
+
</Box>
|
|
160
|
+
</Layout>
|
|
161
|
+
</ScrollView>
|
|
162
|
+
|
|
163
|
+
{pricing && !screen.L ? (
|
|
164
|
+
<Sticky style={style.sticky} onLayout={Platform.OS !== "web" ? handleOnPricingLayout : undefined}>
|
|
165
|
+
<Body>
|
|
166
|
+
<Button testID="confirm-checkout-button" small onPress={handleOnSubmit}>
|
|
167
|
+
{submitButtonText}
|
|
168
|
+
</Button>
|
|
169
|
+
</Body>
|
|
170
|
+
</Sticky>
|
|
171
|
+
) : null}
|
|
149
172
|
|
|
150
173
|
{children}
|
|
151
174
|
</LocalLayout>
|
|
@@ -255,7 +255,7 @@ const Item: FC<ItemProps> = ({ layout: Layout }) => {
|
|
|
255
255
|
header={header}
|
|
256
256
|
scrollEnabled={!itemWithoutCustomerDecission}
|
|
257
257
|
style={{
|
|
258
|
-
header: fiveItemsDiscount !== 0
|
|
258
|
+
header: fiveItemsDiscount !== 0 ? style.headerWithDoubleHeight : style.header,
|
|
259
259
|
scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
|
|
260
260
|
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
261
261
|
}}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
+
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
3
4
|
|
|
4
5
|
const {
|
|
5
6
|
colorTextMedium,
|
|
@@ -11,7 +12,6 @@ const {
|
|
|
11
12
|
space6,
|
|
12
13
|
space12,
|
|
13
14
|
space16,
|
|
14
|
-
space24,
|
|
15
15
|
borderRadius4,
|
|
16
16
|
colorBgBase,
|
|
17
17
|
} = theme();
|
|
@@ -39,6 +39,9 @@ const style = StyleSheet.create({
|
|
|
39
39
|
desktopResume: {
|
|
40
40
|
borderRadius: borderRadius4,
|
|
41
41
|
},
|
|
42
|
+
header: {
|
|
43
|
+
height: HEADER_HEIGHT,
|
|
44
|
+
},
|
|
42
45
|
mobileInfo: {
|
|
43
46
|
paddingHorizontal: space6,
|
|
44
47
|
paddingTop: space6,
|
|
@@ -64,7 +67,7 @@ const style = StyleSheet.create({
|
|
|
64
67
|
...Platform.select({
|
|
65
68
|
web: {
|
|
66
69
|
position: "sticky",
|
|
67
|
-
top:
|
|
70
|
+
top: space12,
|
|
68
71
|
alignSelf: "flex-start",
|
|
69
72
|
},
|
|
70
73
|
}),
|