@revenuecat/purchases-ui-js 4.5.2 → 4.6.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.
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
size,
|
|
47
47
|
padding,
|
|
48
48
|
margin,
|
|
49
|
+
vertical_alignment,
|
|
49
50
|
border,
|
|
50
51
|
shape,
|
|
51
52
|
shadow,
|
|
@@ -107,9 +108,18 @@
|
|
|
107
108
|
} = getPaywallContext();
|
|
108
109
|
const packageInfo = getOptionalPackageInfoContext();
|
|
109
110
|
|
|
111
|
+
const verticalAlignItems = $derived(
|
|
112
|
+
vertical_alignment === "top"
|
|
113
|
+
? "flex-start"
|
|
114
|
+
: vertical_alignment === "bottom"
|
|
115
|
+
? "flex-end"
|
|
116
|
+
: null,
|
|
117
|
+
);
|
|
118
|
+
|
|
110
119
|
const wrapperStyle = $derived(
|
|
111
120
|
css({
|
|
112
121
|
display: "flex",
|
|
122
|
+
...(verticalAlignItems ? { "align-items": verticalAlignItems } : {}),
|
|
113
123
|
width: mapSize(size.width),
|
|
114
124
|
height: mapSize(size.height),
|
|
115
125
|
margin: mapSpacing(margin),
|
|
@@ -128,6 +138,7 @@
|
|
|
128
138
|
const placeholderColor = mapTextColor(colorMode, placeholder_color);
|
|
129
139
|
|
|
130
140
|
return css({
|
|
141
|
+
...(verticalAlignItems ? { height: "auto" } : {}),
|
|
131
142
|
padding: mapSpacing(padding),
|
|
132
143
|
...mapTextColor(colorMode, color),
|
|
133
144
|
"text-align":
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BorderType, ShapeType, ShadowType, SizeType, Spacing, TextAlignments } from "..";
|
|
2
|
+
import type { VerticalAlignment } from "../alignment";
|
|
2
3
|
import type { BaseComponent } from "../base";
|
|
3
4
|
import type { ColorGradientScheme } from "../colors";
|
|
4
5
|
import type { Overrides } from "../overrides";
|
|
@@ -17,6 +18,7 @@ export interface InputTextProps extends BaseComponent {
|
|
|
17
18
|
size: SizeType;
|
|
18
19
|
padding: Spacing;
|
|
19
20
|
margin: Spacing;
|
|
21
|
+
vertical_alignment?: VerticalAlignment | null;
|
|
20
22
|
border?: BorderType | null;
|
|
21
23
|
shape?: ShapeType | null;
|
|
22
24
|
shadow?: ShadowType | null;
|