import type { ReactNode } from "react"; import { Link } from "react-router-dom"; import { Boxes, Layers, Unlink } from "lucide-react"; import { StackIcon } from "@/components/ui/StackIcon"; import type { StackGroup } from "@/lib/stackGroups"; /** * The heading row above a stack's volumes, networks or images. * * One component for all three pages, so a stack looks the same wherever it * appears — same icon, same name, same wording for the leftovers. * * `meta` is whatever the page can count that the others cannot: volumes know * their size, images their update status. It sits at the end in the muted tone * so the stack's name stays the thing you scan for. */ export function StackGroupHeader({ group, colSpan, meta, }: { group: StackGroup; colSpan: number; meta?: ReactNode; }) { return (
); } function Label({ group }: { group: StackGroup }) { if (group.kind === "shared") { return ( <> Shared by several stacks ); } if (group.kind === "builtin") { return ( <> Docker built-ins ); } if (group.kind === "none") { return ( <> Not part of a stack ); } if (group.stack) { return ( <> {group.stack.name} ); } // Labelled with a compose project that is no longer a stack: exactly where // things left behind by a deleted stack collect. return ( <> {group.stackId} stack removed ); }