![Erik Jan de Wit](/assets/img/avatar_default.png)
* merge all namespaces into one added fallback namespace to the configuration to minimize changes to the keys * small fix * Fix the broken `OverridesBackend` * remove stray console log * restore ns argument * PR review * merge main --------- Co-authored-by: Jon Koops <jonkoops@gmail.com>
24 lines
654 B
TypeScript
24 lines
654 B
TypeScript
import { FormGroup } from "@patternfly/react-core";
|
|
import { PropsWithChildren } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { HelpItem } from "ui-shared";
|
|
|
|
export type FieldProps = { label: string; field: string; isReadOnly?: boolean };
|
|
export type FormGroupFieldProps = { label: string };
|
|
|
|
export const FormGroupField = ({
|
|
label,
|
|
children,
|
|
}: PropsWithChildren<FormGroupFieldProps>) => {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<FormGroup
|
|
label={t(label)}
|
|
fieldId={label}
|
|
labelIcon={<HelpItem helpText={t(`${label}Help`)} fieldLabelId={label} />}
|
|
>
|
|
{children}
|
|
</FormGroup>
|
|
);
|
|
};
|