@growth-operations/ui-shared 1.5.0 → 1.5.2
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/package.json +1 -1
- package/src/billing/BillingTab.jsx +8 -3
- package/src/billing/PlanGrid.jsx +28 -17
package/package.json
CHANGED
|
@@ -333,9 +333,14 @@ function CreditsBilling({ context, state, appKey }) {
|
|
|
333
333
|
</LoadingButton>
|
|
334
334
|
))}
|
|
335
335
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
336
|
+
{/* Footer note only when PlanGrid isn't rendering one (PlanGrid owns the
|
|
337
|
+
canonical "managed in Stripe" line when plans are present — avoid
|
|
338
|
+
showing it twice). */}
|
|
339
|
+
{!hasPlans && (
|
|
340
|
+
<Text format={{ fontStyle: "italic" }}>
|
|
341
|
+
Billing is managed in Stripe across all Growth Operations apps.
|
|
342
|
+
</Text>
|
|
343
|
+
)}
|
|
339
344
|
</Flex>
|
|
340
345
|
);
|
|
341
346
|
}
|
package/src/billing/PlanGrid.jsx
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useState } from "react";
|
|
|
2
2
|
import {
|
|
3
3
|
hubspot,
|
|
4
4
|
Flex,
|
|
5
|
+
Box,
|
|
5
6
|
Tile,
|
|
6
7
|
Text,
|
|
7
8
|
Heading,
|
|
@@ -49,23 +50,33 @@ function PlanCard({ plan, interval, onChoose, choosing, checkoutUrl, supportUrl
|
|
|
49
50
|
|
|
50
51
|
return (
|
|
51
52
|
<Tile>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
{/* Full-height column: the content Box grows to fill so the CTA always
|
|
54
|
+
pins to the bottom, aligned across cards (the row stretches them to
|
|
55
|
+
equal height). Otherwise the button floats up under shorter feature
|
|
56
|
+
lists and the cards look ragged. */}
|
|
57
|
+
<Flex direction="column" gap="small" align="stretch">
|
|
58
|
+
<Box flex={1}>
|
|
59
|
+
<Flex direction="column" gap="small">
|
|
60
|
+
<Flex direction="row" gap="small" align="center">
|
|
61
|
+
<Heading>{plan.name ?? plan.tier}</Heading>
|
|
62
|
+
{plan.current && (
|
|
63
|
+
<StatusTag variant="success">Current plan</StatusTag>
|
|
64
|
+
)}
|
|
65
|
+
</Flex>
|
|
66
|
+
|
|
67
|
+
<Text format={{ fontWeight: "bold", fontSize: "lg" }}>{priceText}</Text>
|
|
68
|
+
|
|
69
|
+
{plan.credits_per_period != null && (
|
|
70
|
+
<Text>
|
|
71
|
+
{plan.credits_per_period.toLocaleString()} credits / month
|
|
72
|
+
</Text>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{(plan.features ?? []).map((f, i) => (
|
|
76
|
+
<Text key={i}>• {f}</Text>
|
|
77
|
+
))}
|
|
78
|
+
</Flex>
|
|
79
|
+
</Box>
|
|
69
80
|
|
|
70
81
|
{/* CTA. Current tier => disabled marker. talk_to_sales => contact link.
|
|
71
82
|
Otherwise pre-create-then-link checkout for the selected interval. */}
|