keycloak-scim/src/clients/ClientDescription.tsx

38 lines
1.1 KiB
TypeScript
Raw Normal View History

import React from "react";
import { FormGroup, TextInput } from "@patternfly/react-core";
import { FieldElement, ValidationRules, Ref } from "react-hook-form";
import { useTranslation } from "react-i18next";
type ClientDescriptionProps = {
register<TFieldElement extends FieldElement>(
rules?: ValidationRules
): (ref: (TFieldElement & Ref) | null) => void;
};
export const ClientDescription = ({ register }: ClientDescriptionProps) => {
const { t } = useTranslation("clients");
return (
<>
2020-09-16 14:56:23 +00:00
<FormGroup label={t("clientID")} fieldId="kc-client-id">
<TextInput
ref={register()}
type="text"
id="kc-client-id"
name="clientId"
/>
</FormGroup>
2020-09-16 14:56:23 +00:00
<FormGroup label={t("name")} fieldId="kc-name">
<TextInput ref={register()} type="text" id="kc-name" name="name" />
</FormGroup>
2020-09-16 14:56:23 +00:00
<FormGroup label={t("description")} fieldId="kc-description">
<TextInput
ref={register()}
type="text"
id="kc-description"
name="description"
/>
</FormGroup>
</>
);
};