From 06ec80db42817c9fcdc1daecfff8a6d29b3ea500 Mon Sep 17 00:00:00 2001 From: Pallavi Kumari Date: Sat, 11 Oct 2025 08:13:37 +0530 Subject: [PATCH] replace dialog with credenza --- src/components/PathMatchRenameModal.tsx | 61 +++++++++++-------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/src/components/PathMatchRenameModal.tsx b/src/components/PathMatchRenameModal.tsx index 13d83bd1..101dea19 100644 --- a/src/components/PathMatchRenameModal.tsx +++ b/src/components/PathMatchRenameModal.tsx @@ -6,20 +6,13 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@app/components/ui/dialog"; + import { Badge } from "@app/components/ui/badge"; import { Label } from "@app/components/ui/label"; import { useEffect, useState } from "react"; import { Input } from "./ui/input"; import { Button } from "./ui/button"; +import { Credenza, CredenzaContent, CredenzaDescription, CredenzaFooter, CredenzaHeader, CredenzaTitle, CredenzaTrigger } from "./Credenza"; export function PathMatchModal({ @@ -68,15 +61,15 @@ export function PathMatchModal({ }; return ( - - {trigger} - - - Configure Path Matching - + + {trigger} + + + Configure Path Matching + Set up how incoming requests should be matched based on their path. - - + +
@@ -102,7 +95,7 @@ export function PathMatchModal({

{getHelpText()}

- + {value?.path && ( - -
-
+ + + ); } @@ -177,17 +170,17 @@ export function PathRewriteModal({ }; return ( - - + !disabled && setOpen(v)}> + {trigger} - - - - Configure Path Rewriting - + + + + Configure Path Rewriting + Transform the matched path before forwarding to the target. - - + +
@@ -214,7 +207,7 @@ export function PathRewriteModal({

{getHelpText()}

- + {value?.rewritePath && ( - -
-
+ + + ); }