Skip to content

Commit

Permalink
Update Button Text Wrapping (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon authored Sep 16, 2024
1 parent 358ed0a commit 23613a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/components/PaywallModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function PaywallModal() {
<Dialog.Close asChild>
<Button2
color="blue"
className="mt-4"
className="mt-4 !whitespace-normal !leading-tight"
data-to-pricing={toPricingCode}
onClick={() => {
posthog.capture("clicked-paywall-button");
Expand Down
7 changes: 6 additions & 1 deletion app/src/lib/usePaywallModalStore.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { t } from "@lingui/macro";
import { create } from "zustand";

type PaywallModalStore = {
Expand Down Expand Up @@ -34,8 +35,12 @@ export function showPaywall({
movieUrl,
imgUrl = paywallImageUrl,
toPricingCode,
buttonText = "Learn More", // New parameter with default value
buttonText,
}: Omit<PaywallModalStore, "open">) {
if (!buttonText) {
buttonText = t`Learn More`;
}

// If there is no movie URL, we will preload the image
if (!movieUrl) {
// Pre-load the paywall image
Expand Down

0 comments on commit 23613a4

Please sign in to comment.