import type { CSSProperties, ReactNode } from "react";
import { ChevronDown, ChevronRight } from "lucide-react";
/** One box in a flow diagram: icon tile, title, subtitle and a mono detail line. */
export function FlowNode({
icon,
title,
subtitle,
detail,
accent,
step,
className = "",
}: {
icon: ReactNode;
title: string;
subtitle?: string;
detail?: string;
/** Hex colour used for the icon tile glow. */
accent: string;
step?: number;
className?: string;
}) {
return (
{step !== undefined && (
{step}
)}
{icon}
{title}
{subtitle &&
{subtitle}
}
{detail && (
{detail}
)}
);
}
/**
* Animated dashed connector with an arrow head. Vertical on mobile and
* horizontal on lg+, unless `vertical` pins it to a top-to-bottom hand-off.
*/
export function Connector({
label,
color = "#38bdf8",
vertical = false,
}: {
label?: string;
color?: string;
vertical?: boolean;
}) {
if (vertical) {
return (
);
}
return (
);
}
/** Dashed container that groups nodes belonging to the same host / system. */
export function Boundary({
label,
icon,
children,
className = "",
tone = "border-white/15",
}: {
label: string;
icon: ReactNode;
children: ReactNode;
className?: string;
tone?: string;
}) {
return (
{icon}
{label}
{children}
);
}