Centralize shared WebUI structural primitives

This commit is contained in:
2026-08-18 13:17:31 +02:00
parent ee5c881df9
commit 7685a103e8
26 changed files with 767 additions and 81 deletions
+20
View File
@@ -0,0 +1,20 @@
import type { HTMLAttributes, ReactNode } from "react";
import { translateReactNode, usePlatformLanguage } from "../i18n/LanguageContext";
export type FloatingStatusProps = HTMLAttributes<HTMLDivElement> & {
children: ReactNode;
};
export default function FloatingStatus({ children, className = "", role = "status", ...props }: FloatingStatusProps) {
const { translateText } = usePlatformLanguage();
return (
<div
{...props}
role={role}
className={["floating-status", className].filter(Boolean).join(" ")}
>
{translateReactNode(children, translateText)}
</div>
);
}