@revenuecat/purchases-ui-js 3.3.0 → 3.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.
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
destroy?: () => void;
|
|
59
59
|
update?: (selectedPackageId: string) => void;
|
|
60
60
|
};
|
|
61
|
+
maxContentWidth?: string;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
const {
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
uiConfig,
|
|
78
79
|
walletButtonRender,
|
|
79
80
|
hideBackButtons = false,
|
|
81
|
+
maxContentWidth,
|
|
80
82
|
}: Props = $props();
|
|
81
83
|
|
|
82
84
|
const getColorMode = setColorModeContext(() => preferredColorMode);
|
|
@@ -173,6 +175,9 @@
|
|
|
173
175
|
const style = $derived(
|
|
174
176
|
css({
|
|
175
177
|
...mapBackground(colorMode, null, base.background),
|
|
178
|
+
...(maxContentWidth && {
|
|
179
|
+
"padding-inline": `max(0px, calc((100vw - ${maxContentWidth}) / 2))`,
|
|
180
|
+
}),
|
|
176
181
|
}),
|
|
177
182
|
);
|
|
178
183
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
actionId: string,
|
|
17
17
|
) => void | Promise<void>;
|
|
18
18
|
containerId?: string;
|
|
19
|
+
maxContentWidth?: string;
|
|
19
20
|
}
|
|
20
21
|
const {
|
|
21
22
|
paywallComponents,
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
onActionTriggered,
|
|
26
27
|
onPurchaseClicked,
|
|
27
28
|
containerId = "screen-container",
|
|
29
|
+
maxContentWidth,
|
|
28
30
|
}: Props = $props();
|
|
29
31
|
</script>
|
|
30
32
|
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
{uiConfig}
|
|
37
39
|
variablesPerPackage={VARIABLES}
|
|
38
40
|
{globalVariables}
|
|
41
|
+
{maxContentWidth}
|
|
39
42
|
onNavigateToUrlClicked={() => {}}
|
|
40
43
|
onVisitCustomerCenterClicked={() => {}}
|
|
41
44
|
onBackClicked={() => {}}
|
|
@@ -9,6 +9,7 @@ interface Props {
|
|
|
9
9
|
onActionTriggered?: (actionId: string) => void;
|
|
10
10
|
onPurchaseClicked?: (packageId: string, actionId: string) => void | Promise<void>;
|
|
11
11
|
containerId?: string;
|
|
12
|
+
maxContentWidth?: string;
|
|
12
13
|
}
|
|
13
14
|
declare const Screen: import("svelte").Component<Props, {}, "">;
|
|
14
15
|
type Screen = ReturnType<typeof Screen>;
|