Files
flow-tools/src/components/HelpDialog.tsx
T
2026-09-01 14:10:51 +02:00

37 lines
941 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { useEffect, useRef } from "react";
export function HelpDialog({
open,
onClose,
}: {
open: boolean;
onClose: () => void;
}) {
const r = useRef<HTMLDialogElement>(null);
useEffect(() => {
if (open && !r.current?.open) r.current?.showModal();
else if (!open && r.current?.open) r.current.close();
}, [open]);
return (
<dialog
ref={r}
onClose={onClose}
onCancel={onClose}
aria-label="About Flow Tools"
>
<button className="close" onClick={onClose}>
×
</button>
<h2>Flow Tools</h2>
<p>
Build bounded transformations from fixed primitives, inspect every
stage, and export deterministic recipes or results.
</p>
<p>
No stage runs JavaScript, accesses the network, mutates input files or
hides conversion loss. Join expansion, rows, fields and recipe size are
capped.
</p>
</dialog>
);
}