@lookiero/checkout 0.5.0-beta.2 → 0.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.
|
@@ -3,7 +3,7 @@ import { Platform, ScrollView } from "react-native";
|
|
|
3
3
|
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
4
|
import { theme } from "../../theme/theme";
|
|
5
5
|
const { spaceXXXL } = theme();
|
|
6
|
-
const SafeAreaScrollView = ({ children, footer, edges = ["top", "
|
|
6
|
+
const SafeAreaScrollView = ({ children, footer, edges = ["top", "left", "right"], style: customStyle, scrollerPaddingTop = 0, }) => {
|
|
7
7
|
const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
|
|
8
8
|
return (React.createElement(SafeAreaView, { edges: edges, style: customStyle?.safeAreaView },
|
|
9
9
|
React.createElement(ScrollView, { contentContainerStyle: [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
3
4
|
import { Column } from "../../../../ui/components/layouts/column/Column";
|
|
4
5
|
import { Row } from "../../../../ui/components/layouts/row/Row";
|
|
5
6
|
import { Stack } from "../../../../ui/components/layouts/stack/Stack";
|
|
@@ -8,10 +9,11 @@ import { NotificationItem } from "./NotificationItem";
|
|
|
8
9
|
import { style } from "./Notifications.style";
|
|
9
10
|
const NOTIFICATIONS_AUTOHIDE_TIMEOUT = 10000;
|
|
10
11
|
const Notifications = ({ notifications = [], onRemove, autoHideTimeout = NOTIFICATIONS_AUTOHIDE_TIMEOUT, }) => {
|
|
12
|
+
const { top: safeAreaInsetTop } = useSafeAreaInsets();
|
|
11
13
|
const screenSize = useScreenSize();
|
|
12
14
|
const isSmallDevice = screenSize === "S";
|
|
13
15
|
return (React.createElement(View, { pointerEvents: "box-none", style: style.notifications, testID: "notifications" },
|
|
14
|
-
React.createElement(Row, { style: [style.row, isSmallDevice && style.rowSmall] },
|
|
16
|
+
React.createElement(Row, { style: [style.row, isSmallDevice && style.rowSmall, { paddingTop: safeAreaInsetTop }] },
|
|
15
17
|
React.createElement(Column, null,
|
|
16
18
|
React.createElement(Stack, null, notifications.map((notification) => (React.createElement(NotificationItem, { key: notification.id, autoHideTimeout: autoHideTimeout, notification: notification, style: { toast: style.toast }, testID: notification.id, onRemove: onRemove }))))))));
|
|
17
19
|
};
|