keycloak-scim/js/apps/admin-ui/src/identity-providers/component/FormGroupField.tsx
Erik Jan de Wit 564441899b
merge all namespaces into one (#22949)
* 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>
2023-09-08 15:17:17 +02:00

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>
);
};