Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Styling fix for payment summary panel

Joshen Lima348398ab517
diff --git a/studio/components/interfaces/Billing/EnterpriseUpdate.tsx b/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
index d6a7fd01e16..5ac973cd655 100644
--- a/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
+++ b/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
@@ -272,42 +272,40 @@ const EnterpriseUpdate: FC<Props> = ({
</div>
</div>
</div>
- <div className="min-w-[440px]">
- <PaymentSummaryPanel
- isSpendCapEnabled={true}
- isSubmitting={isSubmitting}
- isRefreshingPreview={isRefreshingPreview}
- currentSubscription={currentSubscription}
- subscriptionPreview={subscriptionPreview}
- // Current subscription configuration based on DB
- currentPlan={currentSubscription.tier}
- currentAddons={currentAddons}
- // Selected subscription configuration based on UI
- selectedAddons={selectedAddons}
- paymentMethods={paymentMethods}
- isLoadingPaymentMethods={isLoadingPaymentMethods}
- selectedPaymentMethod={selectedPaymentMethodId}
- onSelectPaymentMethod={setSelectedPaymentMethodId}
- onSelectAddNewPaymentMethod={() => {
- setShowAddPaymentMethodModal(true)
- }}
- beforeConfirmPayment={beforeConfirmPayment}
- onConfirmPayment={onConfirmPayment}
- captcha={
- <HCaptcha
- ref={captchaRef}
- sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY!}
- size="invisible"
- onVerify={(token) => {
- setCaptchaToken(token)
- }}
- onExpire={() => {
- setCaptchaToken(null)
- }}
- />
- }
- />
- </div>
+ <PaymentSummaryPanel
+ isSpendCapEnabled={true}
+ isSubmitting={isSubmitting}
+ isRefreshingPreview={isRefreshingPreview}
+ currentSubscription={currentSubscription}
+ subscriptionPreview={subscriptionPreview}
+ // Current subscription configuration based on DB
+ currentPlan={currentSubscription.tier}
+ currentAddons={currentAddons}
+ // Selected subscription configuration based on UI
+ selectedAddons={selectedAddons}
+ paymentMethods={paymentMethods}
+ isLoadingPaymentMethods={isLoadingPaymentMethods}
+ selectedPaymentMethod={selectedPaymentMethodId}
+ onSelectPaymentMethod={setSelectedPaymentMethodId}
+ onSelectAddNewPaymentMethod={() => {
+ setShowAddPaymentMethodModal(true)
+ }}
+ beforeConfirmPayment={beforeConfirmPayment}
+ onConfirmPayment={onConfirmPayment}
+ captcha={
+ <HCaptcha
+ ref={captchaRef}
+ sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY!}
+ size="invisible"
+ onVerify={(token) => {
+ setCaptchaToken(token)
+ }}
+ onExpire={() => {
+ setCaptchaToken(null)
+ }}
+ />
+ }
+ />
</Transition>
<AddNewPaymentMethodModal
diff --git a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
index bc1ca0c4e74..60d4149fda2 100644
--- a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
+++ b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
@@ -14,6 +14,7 @@ import { getPITRDays } from './PaymentSummaryPanel.utils'
import ConfirmPaymentModal from './ConfirmPaymentModal'
import { StripeSubscription } from '../Subscription/Subscription.types'
import { useIsProjectActive } from 'components/layouts/ProjectLayout/ProjectContext'
+import clsx from 'clsx'
// [Joshen] PITR stuff can be undefined for now until we officially launch PITR self serve
@@ -178,7 +179,11 @@ const PaymentSummaryPanel = ({
return (
<>
<div
- className="w-full px-6 py-10 space-y-8 overflow-y-auto border-l bg-panel-body-light dark:bg-panel-body-dark lg:px-12"
+ className={clsx(
+ 'bg-panel-body-light dark:bg-panel-body-dark overflow-y-auto border-l',
+ 'px-6 lg:px-12 py-10 space-y-8',
+ 'min-w-[450px] max-w-[450px] 2xl:min-w-[630px] 2xl:max-w-[630px]'
+ )}
style={{ height: 'calc(100vh - 57px)' }}
>
<p>Payment Summary</p>
diff --git a/studio/components/interfaces/Billing/PlanSelection/PlanSelection.tsx b/studio/components/interfaces/Billing/PlanSelection/PlanSelection.tsx
index e57255724be..be18a54c621 100644
--- a/studio/components/interfaces/Billing/PlanSelection/PlanSelection.tsx
+++ b/studio/components/interfaces/Billing/PlanSelection/PlanSelection.tsx
@@ -30,7 +30,7 @@ const PlanSelection: FC<Props> = ({ visible, tiers, currentPlan, onSelectPlan })
enterTo="transform opacity-100 translate-x-0"
>
<div>
- <h4 className="text-lg mb-8">Change your project's subscription</h4>
+ <h4 className="text-lg">Change your project's subscription</h4>
<div className={`grid py-8 grid-cols-2 ${gridCols}`}>
{formattedTiers.map((plan) => {
return (
diff --git a/studio/components/interfaces/Billing/ProUpgrade.tsx b/studio/components/interfaces/Billing/ProUpgrade.tsx
index fac2c6db074..79cabf80039 100644
--- a/studio/components/interfaces/Billing/ProUpgrade.tsx
+++ b/studio/components/interfaces/Billing/ProUpgrade.tsx
@@ -321,43 +321,41 @@ const ProUpgrade: FC<Props> = ({
</div>
</div>
</div>
- <div className="min-w-[440px]">
- <PaymentSummaryPanel
- isRefreshingPreview={isRefreshingPreview}
- subscriptionPreview={subscriptionPreview}
- isSpendCapEnabled={isSpendCapEnabled}
- // Current subscription configuration based on DB
- currentPlan={currentSubscription.tier}
- currentAddons={currentAddons}
- currentSubscription={currentSubscription}
- // Selected subscription configuration based on UI
- selectedPlan={selectedTier}
- selectedAddons={selectedAddons}
- paymentMethods={paymentMethods}
- isLoadingPaymentMethods={isLoadingPaymentMethods}
- selectedPaymentMethod={selectedPaymentMethodId}
- onSelectPaymentMethod={setSelectedPaymentMethodId}
- onSelectAddNewPaymentMethod={() => {
- setShowAddPaymentMethodModal(true)
- }}
- beforeConfirmPayment={beforeConfirmPayment}
- onConfirmPayment={onConfirmPayment}
- isSubmitting={isSubmitting}
- captcha={
- <HCaptcha
- ref={captchaRef}
- sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY!}
- size="invisible"
- onVerify={(token) => {
- setCaptchaToken(token)
- }}
- onExpire={() => {
- setCaptchaToken(null)
- }}
- />
- }
- />
- </div>
+ <PaymentSummaryPanel
+ isRefreshingPreview={isRefreshingPreview}
+ subscriptionPreview={subscriptionPreview}
+ isSpendCapEnabled={isSpendCapEnabled}
+ // Current subscription configuration based on DB
+ currentPlan={currentSubscription.tier}
+ currentAddons={currentAddons}
+ currentSubscription={currentSubscription}
+ // Selected subscription configuration based on UI
+ selectedPlan={selectedTier}
+ selectedAddons={selectedAddons}
+ paymentMethods={paymentMethods}
+ isLoadingPaymentMethods={isLoadingPaymentMethods}
+ selectedPaymentMethod={selectedPaymentMethodId}
+ onSelectPaymentMethod={setSelectedPaymentMethodId}
+ onSelectAddNewPaymentMethod={() => {
+ setShowAddPaymentMethodModal(true)
+ }}
+ beforeConfirmPayment={beforeConfirmPayment}
+ onConfirmPayment={onConfirmPayment}
+ isSubmitting={isSubmitting}
+ captcha={
+ <HCaptcha
+ ref={captchaRef}
+ sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY!}
+ size="invisible"
+ onVerify={(token) => {
+ setCaptchaToken(token)
+ }}
+ onExpire={() => {
+ setCaptchaToken(null)
+ }}
+ />
+ }
+ />
</Transition>
<AddNewPaymentMethodModal
diff --git a/studio/components/interfaces/Billing/TeamUpgrade.tsx b/studio/components/interfaces/Billing/TeamUpgrade.tsx
index 6a990e86b3a..a8033574110 100644
--- a/studio/components/interfaces/Billing/TeamUpgrade.tsx
+++ b/studio/components/interfaces/Billing/TeamUpgrade.tsx
@@ -225,7 +225,7 @@ const TeamUpgrade: FC<Props> = ({
>
<div className="flex-grow mt-10">
<div className="relative space-y-4">
- <div className="px-32 mx-auto space-y-4 2xl:max-w-5xl">
+ <div className="relative px-32 mx-auto space-y-4 2xl:max-w-5xl">
<BackButton onClick={() => onSelectBack()} />
<h4 className="text-lg text-scale-900 !mb-8">Change your project's subscription</h4>
</div>
@@ -291,43 +291,41 @@ const TeamUpgrade: FC<Props> = ({
</div>
</div>
</div>
- <div className="min-w-[440px]">
- <PaymentSummaryPanel
- isRefreshingPreview={isRefreshingPreview}
- subscriptionPreview={subscriptionPreview}
- isSpendCapEnabled={false}
- // Current subscription configuration based on DB
- currentPlan={currentSubscription.tier}
- currentAddons={currentAddons}
- currentSubscription={currentSubscription}
- // Selected subscription configuration based on UI
- selectedPlan={selectedTier}
- selectedAddons={selectedAddons}
- paymentMethods={paymentMethods}
- isLoadingPaymentMethods={isLoadingPaymentMethods}
- selectedPaymentMethod={selectedPaymentMethodId}
- onSelectPaymentMethod={setSelectedPaymentMethodId}
- onSelectAddNewPaymentMethod={() => {
- setShowAddPaymentMethodModal(true)
- }}
- beforeConfirmPayment={beforeConfirmPayment}
- onConfirmPayment={onConfirmPayment}
- isSubmitting={isSubmitting}
- captcha={
- <HCaptcha
- ref={captchaRef}
- sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY!}
- size="invisible"
- onVerify={(token) => {
- setCaptchaToken(token)
- }}
- onExpire={() => {
- setCaptchaToken(null)
- }}
- />
- }
- />
- </div>
+ <PaymentSummaryPanel
+ isRefreshingPreview={isRefreshingPreview}
+ subscriptionPreview={subscriptionPreview}
+ isSpendCapEnabled={false}
+ // Current subscription configuration based on DB
+ currentPlan={currentSubscription.tier}
+ currentAddons={currentAddons}
+ currentSubscription={currentSubscription}
+ // Selected subscription configuration based on UI
+ selectedPlan={selectedTier}
+ selectedAddons={selectedAddons}
+ paymentMethods={paymentMethods}
+ isLoadingPaymentMethods={isLoadingPaymentMethods}
+ selectedPaymentMethod={selectedPaymentMethodId}
+ onSelectPaymentMethod={setSelectedPaymentMethodId}
+ onSelectAddNewPaymentMethod={() => {
+ setShowAddPaymentMethodModal(true)
+ }}
+ beforeConfirmPayment={beforeConfirmPayment}
+ onConfirmPayment={onConfirmPayment}
+ isSubmitting={isSubmitting}
+ captcha={
+ <HCaptcha
+ ref={captchaRef}
+ sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY!}
+ size="invisible"
+ onVerify={(token) => {
+ setCaptchaToken(token)
+ }}
+ onExpire={() => {
+ setCaptchaToken(null)
+ }}
+ />
+ }
+ />
</Transition>
<AddNewPaymentMethodModal