Link contextual guidance to Docs

This commit is contained in:
2026-08-03 07:33:57 +02:00
parent 70fc6da811
commit b823a22b9b
13 changed files with 191 additions and 4 deletions
+6 -1
View File
@@ -1,6 +1,8 @@
import { AlertTriangle, Info } from "lucide-react";
import type { ReactNode } from "react";
import AdvancedOptionsPanel from "./AdvancedOptionsPanel";
import DocumentationHelpLink from "./help/DocumentationHelpLink";
import type { DocumentationHelpReference } from "./help/documentationHelp";
export type ActionBlockerReason = {
summary: ReactNode;
@@ -23,6 +25,7 @@ type ActionBlockerHintProps = {
tone?: "info" | "warning" | "danger";
className?: string;
labels?: ActionBlockerLabels;
documentation?: DocumentationHelpReference;
};
function joinClasses(...classes: Array<string | undefined | false>) {
@@ -33,7 +36,8 @@ export default function ActionBlockerHint({
reason,
tone = "warning",
className = "",
labels = {}
labels = {},
documentation
}: ActionBlockerHintProps) {
const Icon = tone === "info" ? Info : AlertTriangle;
const hasActionRows = Boolean(reason.requiredAction || reason.actor || reason.target);
@@ -71,6 +75,7 @@ export default function ActionBlockerHint({
<div>{reason.technicalDetails}</div>
</AdvancedOptionsPanel>
)}
{documentation && <DocumentationHelpLink reference={documentation} />}
</div>
</section>
);