keycloak-scim/src/client-scopes/add/components/components.ts
Erik Jan de Wit 27dd8d7e13
deleted original screens, works like old console (#1187)
Co-authored-by: Jon Koops <jonkoops@gmail.com>
2021-09-20 17:31:05 +02:00

23 lines
887 B
TypeScript

import type { FunctionComponent } from "react";
import type { ConfigPropertyRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation";
import { StringComponent } from "./StringComponent";
import { BooleanComponent } from "./BooleanComponent";
import { ListComponent } from "./ListComponent";
import { RoleComponent } from "./RoleComponent";
import { ScriptComponent } from "./ScriptComponent";
export type ComponentProps = Omit<ConfigPropertyRepresentation, "type">;
const ComponentTypes = ["String", "boolean", "List", "Role", "Script"] as const;
export type Components = typeof ComponentTypes[number];
export const COMPONENTS: {
[index in Components]: FunctionComponent<ComponentProps>;
} = {
String: StringComponent,
boolean: BooleanComponent,
List: ListComponent,
Role: RoleComponent,
Script: ScriptComponent,
} as const;