Open source alternative to Semrush and Ahrefs
TypeScript backlink-analysisgoogle-search-console-mcpkeyword-researchmcpseoseo-agentseo-auditseo-automationseo-skillsseo-toolssite-audit
import type { ReactNode } from "react";
import {
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/client/components/ui/dialog";
/**
* A small settings-style dialog: title, labelled rows, right-aligned actions.
* Render it only while it is open. Escape, the close button and a backdrop
* click call `onClose`.
*/
export function FormDialog({
title,
onClose,
actions,
children,
}: {
title: string;
onClose: () => void;
actions: ReactNode;
children: ReactNode;
}) {
return (
<Dialog
open
onOpenChange={(open) => {
if (!open) onClose();
}}
>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
</DialogHeader>
{children}
<DialogFooter>{actions}</DialogFooter>
</DialogContent>
</Dialog>
);
}