@olwiba/ui 0.1.10 → 0.1.11
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/index.d.ts +10 -2
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/PricingCard.tsx +9 -1
- package/src/marketing/PricingSection.tsx +7 -0
package/package.json
CHANGED
|
@@ -18,7 +18,11 @@ export interface PricingCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
cta: string;
|
|
19
19
|
highlighted?: boolean;
|
|
20
20
|
disabled?: boolean;
|
|
21
|
+
/** Disables only the CTA button, leaving the rest of the card interactive. */
|
|
22
|
+
ctaDisabled?: boolean;
|
|
21
23
|
badge?: React.ReactNode;
|
|
24
|
+
/** Rendered directly below the CTA button (e.g. a "Get notified" link). */
|
|
25
|
+
footer?: React.ReactNode;
|
|
22
26
|
onSelect?: () => void;
|
|
23
27
|
}
|
|
24
28
|
|
|
@@ -31,7 +35,9 @@ export function PricingCard({
|
|
|
31
35
|
cta,
|
|
32
36
|
highlighted = false,
|
|
33
37
|
disabled = false,
|
|
38
|
+
ctaDisabled = false,
|
|
34
39
|
badge,
|
|
40
|
+
footer,
|
|
35
41
|
onSelect,
|
|
36
42
|
className,
|
|
37
43
|
...props
|
|
@@ -72,11 +78,13 @@ export function PricingCard({
|
|
|
72
78
|
variant={highlighted ? 'default' : 'outline'}
|
|
73
79
|
className="mt-6 w-full"
|
|
74
80
|
onClick={onSelect}
|
|
75
|
-
disabled={disabled}
|
|
81
|
+
disabled={disabled || ctaDisabled}
|
|
76
82
|
>
|
|
77
83
|
{cta}
|
|
78
84
|
</Button>
|
|
79
85
|
|
|
86
|
+
{footer && <div className="mt-3 text-center text-sm">{footer}</div>}
|
|
87
|
+
|
|
80
88
|
<Separator className="my-6" />
|
|
81
89
|
|
|
82
90
|
<ul className="space-y-3 text-sm">
|
|
@@ -15,6 +15,8 @@ export interface PricingPlan {
|
|
|
15
15
|
cta: string;
|
|
16
16
|
highlighted?: boolean;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
+
/** Disables only the CTA button, leaving the rest of the card interactive. */
|
|
19
|
+
ctaDisabled?: boolean;
|
|
18
20
|
features: PricingFeature[];
|
|
19
21
|
/** Overrides computed price display (e.g. "$?" for community/reach-out tiers). */
|
|
20
22
|
priceDisplay?: string;
|
|
@@ -33,6 +35,8 @@ export interface PricingSectionProps {
|
|
|
33
35
|
footnote?: string;
|
|
34
36
|
mode?: 'subscription' | 'one-time';
|
|
35
37
|
foundingDeadline?: string;
|
|
38
|
+
/** Rendered below each plan's CTA button (e.g. a "Get notified" link). */
|
|
39
|
+
renderPlanFooter?: (plan: PricingPlan) => React.ReactNode;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
const defaultRenderLink: AppShellRenderLink = ({ href, children, className }) => (
|
|
@@ -50,6 +54,7 @@ export function PricingSection({
|
|
|
50
54
|
footnote,
|
|
51
55
|
mode = 'subscription',
|
|
52
56
|
foundingDeadline,
|
|
57
|
+
renderPlanFooter,
|
|
53
58
|
}: PricingSectionProps) {
|
|
54
59
|
const [annual, setAnnual] = React.useState(false);
|
|
55
60
|
const isOneTime = mode === 'one-time';
|
|
@@ -139,7 +144,9 @@ export function PricingSection({
|
|
|
139
144
|
cta={plan.cta}
|
|
140
145
|
highlighted={plan.highlighted}
|
|
141
146
|
disabled={plan.disabled}
|
|
147
|
+
ctaDisabled={plan.ctaDisabled}
|
|
142
148
|
badge={badge}
|
|
149
|
+
footer={renderPlanFooter?.(plan)}
|
|
143
150
|
/>
|
|
144
151
|
);
|
|
145
152
|
})}
|