Skip to content

Commit

Permalink
Add getDefaultValue to signin, hence shuffle the existing types to in…
Browse files Browse the repository at this point in the history
…clude that
  • Loading branch information
amitbadala committed Nov 1, 2023
1 parent 1339645 commit 0333dbf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
3 changes: 0 additions & 3 deletions lib/build/recipe/emailpassword/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/build/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions lib/ts/recipe/emailpassword/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export type SignUpFormFeatureUserInput = FeatureBaseConfig & {
*/
formFields?: (FormField & {
inputComponent?: (props: InputProps) => JSX.Element;
getDefaultValue?: () => string;
})[];

/*
Expand All @@ -156,7 +155,6 @@ export type NormalisedSignUpFormFeatureConfig = NormalisedBaseConfig & {
*/
formFields: (NormalisedFormField & {
inputComponent?: (props: InputProps) => JSX.Element;
getDefaultValue?: () => string;
})[];

/*
Expand Down Expand Up @@ -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 = {
Expand Down
10 changes: 10 additions & 0 deletions lib/ts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand Down Expand Up @@ -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<P = any> = ComponentClass<P, any> | ((props: P) => JSX.Element);
Expand Down

0 comments on commit 0333dbf

Please sign in to comment.