Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

refactor(dialog): improve dialog component layout and styling for billing settings (#7245)

marliessophiefda5fcdd0cbb
diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsx
index 924496ed65..1dc68088d6 100644
--- a/web/src/components/ui/dialog.tsx
+++ b/web/src/components/ui/dialog.tsx
@@ -75,7 +75,7 @@ const DialogContent = React.forwardRef<
{...props}
>
{children}
- <DialogPrimitive.Close className="absolute right-4 top-4 z-20 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
+ <DialogPrimitive.Close className="absolute right-3 top-3 z-20 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
@@ -91,7 +91,7 @@ const DialogHeader = ({
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "sticky top-0 z-10 flex flex-shrink-0 flex-col space-y-1.5 border-b bg-background p-6 pb-4 text-center sm:text-left",
+ "sticky top-0 z-10 flex flex-shrink-0 flex-col space-y-1.5 rounded-t-lg border-b bg-background p-6 pb-4 text-center sm:text-left",
className,
)}
{...props}
@@ -106,7 +106,7 @@ const DialogBody = React.forwardRef<
<div
ref={ref}
className={cn(
- "flex flex-1 flex-col gap-4 overflow-y-auto px-6 pb-6 [&:has(+.dialog-footer)]:pb-0",
+ "flex flex-1 flex-col gap-4 overflow-y-auto px-6 py-4 [&:has(+.dialog-footer)]:pb-0",
className,
)}
{...props}
@@ -120,7 +120,7 @@ const DialogFooter = ({
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "dialog-footer sticky bottom-0 z-10 flex flex-shrink-0 flex-col-reverse border-t bg-background p-6 px-6 sm:flex-row sm:justify-end sm:space-x-2",
+ "dialog-footer sticky bottom-0 z-10 flex flex-shrink-0 flex-col-reverse rounded-b-lg border-t bg-background p-6 px-6 sm:flex-row sm:justify-end sm:space-x-2",
className,
)}
{...props}
diff --git a/web/src/ee/features/billing/components/BillingSettings.tsx b/web/src/ee/features/billing/components/BillingSettings.tsx
index e66df78e7a..6c4d1c06ce 100644
--- a/web/src/ee/features/billing/components/BillingSettings.tsx
+++ b/web/src/ee/features/billing/components/BillingSettings.tsx
@@ -219,17 +219,13 @@ const BillingPortalOrPricingPageButton = () => {
<Button>Change plan</Button>
</DialogTrigger>
<DialogContent className="max-w-5xl">
- <DialogHeader>
- <Header
- title="Plans"
- actionButtons={
- <Button variant="secondary" asChild>
- <Link href="https://langfuse.com/pricing" target="_blank">
- Comparison of plans ↗
- </Link>
- </Button>
- }
- />
+ <DialogHeader className="flex flex-row items-center justify-between">
+ <DialogTitle>Plans</DialogTitle>
+ <Button variant="secondary" asChild>
+ <Link href="https://langfuse.com/pricing" target="_blank">
+ Comparison of plans ↗
+ </Link>
+ </Button>
</DialogHeader>
<DialogBody>
<div className="mb-3 grid grid-cols-1 gap-3 md:grid-cols-3">