Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update add-edit-discount-sheet.tsx

Kiran K638caced6af6
diff --git a/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx b/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx
index 57eab8adf0..4bdfd65f5d 100644
--- a/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx
+++ b/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx
@@ -359,6 +359,9 @@ function DiscountSheetContent({
<VerticalLine />
<DiscountSheetCard
+ className={cn(
+ discount && "pointer-events-none cursor-not-allowed select-none",
+ )}
title={
<>
<Stripe className="size-7" />
@@ -489,9 +492,19 @@ function DiscountSheetContent({
function DiscountSheetCard({
title,
content,
-}: PropsWithChildren<{ title: ReactNode; content: ReactNode }>) {
+ className,
+}: PropsWithChildren<{
+ title: ReactNode;
+ content: ReactNode;
+ className?: string;
+}>) {
return (
- <div className="border-border-subtle rounded-xl border bg-white text-sm shadow-sm">
+ <div
+ className={cn(
+ "border-border-subtle rounded-xl border bg-white text-sm shadow-sm",
+ className,
+ )}
+ >
<div className="text-content-emphasis flex items-center gap-2.5 p-2.5 font-medium">
{title}
</div>