;
};
export declare type ReactComponentClass = ComponentClass
| ((props: P) => JSX.Element);
export declare type FeatureBaseConfig = {
diff --git a/lib/ts/recipe/emailpassword/types.ts b/lib/ts/recipe/emailpassword/types.ts
index 274fa30b2..432008bb7 100644
--- a/lib/ts/recipe/emailpassword/types.ts
+++ b/lib/ts/recipe/emailpassword/types.ts
@@ -236,14 +236,23 @@ export type NormalisedEnterEmailForm = FeatureBaseConfig & {
type FormThemeBaseProps = ThemeBaseProps & {
/*
- * Form fields to use in the signin form.
+ * Form fields to use in the signup form.
*/
formFields: FormFieldThemeProps[];
error: string | undefined;
};
-export type SignInThemeProps = FormThemeBaseProps & {
+type SignInFormThemeBaseProps = ThemeBaseProps & {
+ /*
+ * Form fields to use in the signin form. exclude custom component
+ */
+ formFields: Omit[];
+
+ error: string | undefined;
+};
+
+export type SignInThemeProps = SignInFormThemeBaseProps & {
recipeImplementation: RecipeInterface;
clearError: () => void;
onError: (error: string) => void;
@@ -260,7 +269,6 @@ export type SignUpThemeProps = FormThemeBaseProps & {
config: NormalisedConfig;
signInClicked?: () => void;
onSuccess: (result: { user: User }) => void;
- formFields: (FormFieldThemeProps & { inputComponent?: React.FC })[];
};
export type SignInAndUpThemeProps = {
@@ -289,6 +297,11 @@ export type FormFieldThemeProps = NormalisedFormField & {
* Clears the field after calling the API.
*/
clearOnSubmit?: boolean;
+
+ /*
+ * Ability to add custom components
+ */
+ inputComponent?: React.FC;
};
export type FormFieldError = {
diff --git a/lib/ts/types.ts b/lib/ts/types.ts
index 595b24315..8399585b5 100644
--- a/lib/ts/types.ts
+++ b/lib/ts/types.ts
@@ -13,7 +13,6 @@
* under the License.
*/
-import type { InputProps } from "./recipe/emailpassword/components/library/input";
import type { BaseRecipeModule } from "./recipe/recipeModule/baseRecipeModule";
import type { NormalisedConfig as NormalisedRecipeModuleConfig } from "./recipe/recipeModule/types";
import type { TranslationFunc, TranslationStore } from "./translation/translationHelpers";
@@ -284,11 +283,6 @@ export type NormalisedFormField = {
* Moves focus to the input element when it mounts
*/
autofocus?: boolean;
-
- /*
- * Ability to add custom components
- */
- inputComponent?: React.FC;
};
export type ReactComponentClass = ComponentClass
| ((props: P) => JSX.Element);