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 = { type Option = {
id: string; id: string;
label: string; label: ReactNode;
description?: string | null; description?: ReactNode;
disabled?: boolean; disabled?: boolean;
}; };
@@ -37,11 +38,11 @@ export default function AdminSelectionList({
}} /> }} />
<span> <span>
<strong>{translateText(option.label)}</strong> <strong>{translateReactNode(option.label, translateText)}</strong>
{option.description && <small>{translateText(option.description)}</small>} {option.description && <small>{translateReactNode(option.description, translateText)}</small>}
</span> </span>
</label> </label>
)} )}
</div>); </div>);
} }