mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-25 08:48:13 +02:00
chore: add and improve documentation
This commit is contained in:
parent
96f8aaf325
commit
8b820c6d8a
23 changed files with 395 additions and 54 deletions
|
|
@ -12,6 +12,7 @@ interface NodeEditDialogProps {
|
|||
title: string;
|
||||
children: ReactNode;
|
||||
onSave?: () => void;
|
||||
error?: string | null;
|
||||
}
|
||||
|
||||
export const NodeEditDialog = ({
|
||||
|
|
@ -20,7 +21,8 @@ export const NodeEditDialog = ({
|
|||
nodeData,
|
||||
title,
|
||||
children,
|
||||
onSave
|
||||
onSave,
|
||||
error
|
||||
}: NodeEditDialogProps) => {
|
||||
const handleClose = () => onOpenChange(false);
|
||||
|
||||
|
|
@ -51,6 +53,12 @@ export const NodeEditDialog = ({
|
|||
<div className="grid gap-4 py-4">
|
||||
{children}
|
||||
</div>
|
||||
{error && (
|
||||
<div className="flex items-center gap-2 rounded-md bg-red-50 p-3 text-sm text-red-600 border border-red-200">
|
||||
<AlertCircle className="h-4 w-4 flex-shrink-0" />
|
||||
<span>{error}</span>
|
||||
</div>
|
||||
)}
|
||||
<DialogFooter>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="outline" onClick={handleClose}>Cancel</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue