refactor(webui): generalize central selection lists

This commit is contained in:
2026-07-21 12:34:35 +02:00
parent 8e9eb6e1f5
commit 9131838b98

View File

@@ -1,9 +1,10 @@
import { usePlatformLanguage } from "../../i18n/LanguageContext";
import type { ReactNode } from "react";
import { translateReactNode, usePlatformLanguage } from "../../i18n/LanguageContext";
type Option = {
id: string;
label: string;
description?: string | null;
label: ReactNode;
description?: ReactNode;
disabled?: boolean;
};
@@ -37,8 +38,8 @@ export default function AdminSelectionList({
}} />
<span>
<strong>{translateText(option.label)}</strong>
{option.description && <small>{translateText(option.description)}</small>}
<strong>{translateReactNode(option.label, translateText)}</strong>
{option.description && <small>{translateReactNode(option.description, translateText)}</small>}
</span>
</label>
)}