Add createKey to quick-add manifests and client create dialog host. FAB and command palette open in-place create UIs instead of navigating away.
30 lines
833 B
TypeScript
30 lines
833 B
TypeScript
"use client";
|
|
|
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";
|
|
import { ContainerForm } from "@/modules/garden/components/container-form";
|
|
|
|
type Props = {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
};
|
|
|
|
export function ContainerCreateDialog({ open, onOpenChange }: Props) {
|
|
return (
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
<DialogContent className="sm:max-w-md max-h-[90dvh] overflow-y-auto">
|
|
{open ? (
|
|
<>
|
|
<DialogHeader>
|
|
<DialogTitle>Add container</DialogTitle>
|
|
</DialogHeader>
|
|
<ContainerForm
|
|
onSuccess={() => onOpenChange(false)}
|
|
onCancel={() => onOpenChange(false)}
|
|
/>
|
|
</>
|
|
) : null}
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|