Fix numerous bugs, improve structure

This commit is contained in:
garronej
2023-03-21 05:27:31 +01:00
parent 6691992a79
commit c9e546a8fd
35 changed files with 285 additions and 274 deletions

View File

@ -1,6 +1,6 @@
import type { LazyExoticComponent } from "react";
import type { I18n } from "keycloakify/account/i18n";
import { type TemplateProps } from "keycloakify/account/TemplateProps";
import type { TemplateProps, ClassKey } from "keycloakify/account/TemplateProps";
export type PageProps<KcContext, I18nExtended extends I18n> = {
Template: LazyExoticComponent<(props: TemplateProps<any, any>) => JSX.Element | null>;
@ -9,13 +9,3 @@ export type PageProps<KcContext, I18nExtended extends I18n> = {
doUseDefaultCss: boolean;
classes?: Partial<Record<ClassKey, string>>;
};
export type ClassKey = "kcButtonClass" | "kcButtonPrimaryClass" | "kcButtonLargeClass" | "kcButtonDefaultClass";
export const defaultClasses: Record<ClassKey, string | undefined> = {
/** password.ftl */
"kcButtonClass": "btn",
"kcButtonPrimaryClass": "btn-primary",
"kcButtonLargeClass": "btn-lg",
"kcButtonDefaultClass": "btn-default"
};