Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,39 @@
import { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router";
import { BannerAlert } from "~/ui/components/BannerAlert";
// Subframe migration (strangler shim):
// Keeps the original WarningBanner API but renders the Subframe design-system BannerAlert
// (type="warning"). BannerAlert has no separate title slot, so the title is composed into the
// content (rendered bold) alongside text/redirect/children — same as before, all ReactNode.
// `redirect` maps to BannerAlert's `actionLabel` (the underlined action).
interface Props {
title?: ReactNode;
text?: ReactNode;
redirect?: string;
children?: ReactNode;
}
export default function WarningBanner({ title, text = "", redirect, children }: Props) {
const { t } = useTranslation();
return (
<BannerAlert
className="not-prose"
type="warning"
fillContainer
actionLabel={
redirect ? (
<Link to={redirect}>
{t("shared.goTo")} {redirect}
</Link>
) : undefined
}
>
<span className="font-medium">{title ?? t("shared.warning")}</span>{" "}
{text}
{children}
</BannerAlert>
);
}