Skip to content

Commit

Permalink
feat(types): Add initialValues prop to the SignIn/Up types
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg authored and SokratisVidros committed Sep 28, 2023
1 parent 7c322e0 commit 01cfcdd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/types/src/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,21 @@ export interface Resources {

export type RoutingStrategy = 'path' | 'hash' | 'virtual';

export type SignInInitialValues = {
emailAddress?: string;
phoneNumber?: string;
username?: string;
};

export type SignUpInitialValues = {
emailAddress?: string;
phoneNumber?: string;
firstName?: string;
lastName?: string;
username?: string;
web3WalletAddress?: string;
};

export type RedirectOptions = {
/**
* Full URL or path to navigate after successful sign in.
Expand Down Expand Up @@ -611,6 +626,10 @@ export type SignInProps = {
* prop of ClerkProvided (if one is provided)
*/
appearance?: SignInTheme;
/**
* Initial values that are used to prefill the sign in form.
*/
initialValues?: SignInInitialValues;
} & RedirectOptions;

export type SignUpProps = {
Expand Down Expand Up @@ -638,6 +657,10 @@ export type SignUpProps = {
* Additional arbitrary metadata to be stored alongside the User object
*/
unsafeMetadata?: SignUpUnsafeMetadata;
/**
* Initial values that are used to prefill the sign up form.
*/
initialValues?: SignUpInitialValues;
} & RedirectOptions;

export type UserProfileProps = {
Expand Down

0 comments on commit 01cfcdd

Please sign in to comment.