This commit is contained in:
Erik Jan de Wit 2022-03-16 12:11:51 +01:00 committed by GitHub
parent 8fa978aeb0
commit e672849935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,22 +2,12 @@ import React from "react";
import { FormGroup, Grid, GridItem } from "@patternfly/react-core";
import { useTranslation } from "react-i18next";
import { FormAccess } from "../../../components/form-access/FormAccess";
import "../../realm-settings-section.css";
import { FormProvider, useFormContext } from "react-hook-form";
import {
AttributeInput,
AttributeType,
} from "../../../components/attribute-input/AttributeInput";
import { AttributeInput } from "../../../components/attribute-input/AttributeInput";
export type AttributeAnnotationsProps = {
isKeySelectable?: boolean;
selectableValues?: AttributeType[];
};
import "../../realm-settings-section.css";
export const AttributeAnnotations = ({
isKeySelectable,
selectableValues,
}: AttributeAnnotationsProps) => {
export const AttributeAnnotations = () => {
const { t } = useTranslation("realm-settings");
const form = useFormContext();
@ -32,11 +22,7 @@ export const AttributeAnnotations = ({
<Grid className="kc-annotations">
<GridItem>
<FormProvider {...form}>
<AttributeInput
isKeySelectable={isKeySelectable}
selectableValues={selectableValues}
name="annotations"
/>
<AttributeInput name="annotations" />
</FormProvider>
</GridItem>
</Grid>