parent
c97c804ad9
commit
586375b5f4
3 changed files with 10 additions and 1 deletions
|
@ -2,6 +2,7 @@ import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useFormContext, useWatch } from "react-hook-form";
|
import { useFormContext, useWatch } from "react-hook-form";
|
||||||
import {
|
import {
|
||||||
|
Divider,
|
||||||
ExpandableSection,
|
ExpandableSection,
|
||||||
FormGroup,
|
FormGroup,
|
||||||
TextInput,
|
TextInput,
|
||||||
|
@ -11,6 +12,8 @@ import {
|
||||||
import { SwitchField } from "../component/SwitchField";
|
import { SwitchField } from "../component/SwitchField";
|
||||||
import { TextField } from "../component/TextField";
|
import { TextField } from "../component/TextField";
|
||||||
|
|
||||||
|
import "./discovery-settings.css";
|
||||||
|
|
||||||
type DiscoverySettingsProps = {
|
type DiscoverySettingsProps = {
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
};
|
};
|
||||||
|
@ -124,6 +127,7 @@ export const DiscoverySettings = ({ readOnly }: DiscoverySettingsProps) => {
|
||||||
<>
|
<>
|
||||||
{readOnly && (
|
{readOnly && (
|
||||||
<ExpandableSection
|
<ExpandableSection
|
||||||
|
className="keycloak__discovery-settings__metadata"
|
||||||
toggleText={isExpanded ? t("hideMetaData") : t("showMetaData")}
|
toggleText={isExpanded ? t("hideMetaData") : t("showMetaData")}
|
||||||
onToggle={() => setIsExpanded(!isExpanded)}
|
onToggle={() => setIsExpanded(!isExpanded)}
|
||||||
isExpanded={isExpanded}
|
isExpanded={isExpanded}
|
||||||
|
@ -132,6 +136,7 @@ export const DiscoverySettings = ({ readOnly }: DiscoverySettingsProps) => {
|
||||||
</ExpandableSection>
|
</ExpandableSection>
|
||||||
)}
|
)}
|
||||||
{!readOnly && <Fields readOnly={readOnly} />}
|
{!readOnly && <Fields readOnly={readOnly} />}
|
||||||
|
<Divider />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
4
src/identity-providers/add/discovery-settings.css
Normal file
4
src/identity-providers/add/discovery-settings.css
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
.keycloak__discovery-settings__metadata .pf-c-expandable-section__toggle {
|
||||||
|
margin-left: var(--pf-c-form--m-horizontal__group-label--md--GridColumnWidth);
|
||||||
|
}
|
|
@ -36,7 +36,7 @@ export const SwitchField = ({
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
onChange(fieldType === "string" ? "" + value : value)
|
onChange(fieldType === "string" ? "" + value : value)
|
||||||
}
|
}
|
||||||
readOnly={isReadOnly}
|
isDisabled={isReadOnly}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue