Skip to content

Commit

Permalink
Move inputComponent to signup types
Browse files Browse the repository at this point in the history
  • Loading branch information
amitbadala committed Oct 24, 2023
1 parent e365a13 commit c8b31db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
8 changes: 6 additions & 2 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.

1 change: 0 additions & 1 deletion lib/build/types.d.ts

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

13 changes: 7 additions & 6 deletions lib/ts/recipe/emailpassword/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ export type NormalisedSignInFormFeatureConfig = NormalisedBaseConfig & {

export type FormFieldSignInConfig = FormFieldBaseConfig;

export type FormFieldSignUpConfig = FormField;
export type FormFieldSignUpConfig = FormField & {
/*
* Ability to add custom components
*/
inputComponent?: React.FC<InputProps>;
};

export type ResetPasswordUsingTokenUserInput = {
/*
Expand Down Expand Up @@ -255,6 +260,7 @@ export type SignUpThemeProps = FormThemeBaseProps & {
config: NormalisedConfig;
signInClicked?: () => void;
onSuccess: (result: { user: User }) => void;
formFields: (FormFieldThemeProps & { inputComponent?: React.FC<InputProps> })[];
};

export type SignInAndUpThemeProps = {
Expand All @@ -274,11 +280,6 @@ export type FormFieldThemeProps = NormalisedFormField & {
*/
labelComponent?: JSX.Element;

/*
* Custom component that replaces the standard input component
*/
inputComponent?: React.FC<InputProps>;

/*
* Show Is required (*) next to label
*/
Expand Down
5 changes: 0 additions & 5 deletions lib/ts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,6 @@ export type FormField = FormFieldBaseConfig & {
* Whether the field is optional or not.
*/
optional?: boolean;

/*
* Ability to add custom components
*/
inputComponent?: React.FC<InputProps>;
};

export type APIFormField = {
Expand Down

0 comments on commit c8b31db

Please sign in to comment.