diff --git a/lib/build/recipe/emailpassword/types.d.ts b/lib/build/recipe/emailpassword/types.d.ts index 70c7ffcfd..d1cb6e9ea 100644 --- a/lib/build/recipe/emailpassword/types.d.ts +++ b/lib/build/recipe/emailpassword/types.d.ts @@ -79,7 +79,6 @@ export declare type NormalisedSignInAndUpFeatureConfig = { export declare type SignUpFormFeatureUserInput = FeatureBaseConfig & { formFields?: (FormField & { inputComponent?: (props: InputProps) => JSX.Element; - getDefaultValue?: () => string; })[]; privacyPolicyLink?: string; termsOfServiceLink?: string; @@ -87,7 +86,6 @@ export declare type SignUpFormFeatureUserInput = FeatureBaseConfig & { export declare type NormalisedSignUpFormFeatureConfig = NormalisedBaseConfig & { formFields: (NormalisedFormField & { inputComponent?: (props: InputProps) => JSX.Element; - getDefaultValue?: () => string; })[]; privacyPolicyLink?: string; termsOfServiceLink?: string; @@ -153,7 +151,6 @@ export declare type FormFieldThemeProps = NormalisedFormField & { showIsRequired?: boolean; clearOnSubmit?: boolean; inputComponent?: (props: InputProps) => JSX.Element; - getDefaultValue?: () => string; }; export declare type FormFieldError = { id: string; diff --git a/lib/build/types.d.ts b/lib/build/types.d.ts index 1aa7f2568..93605a26e 100644 --- a/lib/build/types.d.ts +++ b/lib/build/types.d.ts @@ -89,6 +89,7 @@ export declare type FormFieldBaseConfig = { id: string; label: string; placeholder?: string; + getDefaultValue?: () => string; }; export declare type FormField = FormFieldBaseConfig & { validate?: (value: any) => Promise; @@ -106,6 +107,7 @@ export declare type NormalisedFormField = { optional: boolean; autoComplete?: string; autofocus?: boolean; + getDefaultValue?: () => string; }; 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 8618f6d1e..5ffe5b3d1 100644 --- a/lib/ts/recipe/emailpassword/types.ts +++ b/lib/ts/recipe/emailpassword/types.ts @@ -136,7 +136,6 @@ export type SignUpFormFeatureUserInput = FeatureBaseConfig & { */ formFields?: (FormField & { inputComponent?: (props: InputProps) => JSX.Element; - getDefaultValue?: () => string; })[]; /* @@ -156,7 +155,6 @@ export type NormalisedSignUpFormFeatureConfig = NormalisedBaseConfig & { */ formFields: (NormalisedFormField & { inputComponent?: (props: InputProps) => JSX.Element; - getDefaultValue?: () => string; })[]; /* @@ -289,11 +287,6 @@ export type FormFieldThemeProps = NormalisedFormField & { * Ability to add custom components */ inputComponent?: (props: InputProps) => JSX.Element; - - /* - * Ability to add custom components - */ - getDefaultValue?: () => string; }; export type FormFieldError = { diff --git a/lib/ts/types.ts b/lib/ts/types.ts index 8399585b5..16beba60b 100644 --- a/lib/ts/types.ts +++ b/lib/ts/types.ts @@ -222,6 +222,11 @@ export type FormFieldBaseConfig = { * placeholder of the input field. */ placeholder?: string; + + /* + *Ability to provide default value to input field. + */ + getDefaultValue?: () => string; }; export type FormField = FormFieldBaseConfig & { @@ -283,6 +288,11 @@ export type NormalisedFormField = { * Moves focus to the input element when it mounts */ autofocus?: boolean; + + /* + *Ability to provide default value to input field. + */ + getDefaultValue?: () => string; }; export type ReactComponentClass

= ComponentClass | ((props: P) => JSX.Element);