Skip to content

Commit

Permalink
chore(vue): Expose initialValues prop within <SignInButton /> and…
Browse files Browse the repository at this point in the history
… `<SignUpButton />` (#4801)
  • Loading branch information
wobsoriano authored Dec 18, 2024
1 parent c9da046 commit aeb5855
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-pandas-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/vue": patch
---

Add `initialValues` option to `<SignInButton />` and `<SignUpButton />` components.
11 changes: 9 additions & 2 deletions packages/vue/src/components/SignInButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { assertSingleChild, normalizeWithDefaultValue } from '../utils';

type SignInButtonProps = Pick<
SignInProps,
'fallbackRedirectUrl' | 'forceRedirectUrl' | 'signUpForceRedirectUrl' | 'signUpFallbackRedirectUrl'
'fallbackRedirectUrl' | 'forceRedirectUrl' | 'signUpForceRedirectUrl' | 'signUpFallbackRedirectUrl' | 'initialValues'
>;

export const SignInButton = defineComponent(
Expand Down Expand Up @@ -42,6 +42,13 @@ export const SignInButton = defineComponent(
};
},
{
props: ['signUpForceRedirectUrl', 'signUpFallbackRedirectUrl', 'fallbackRedirectUrl', 'forceRedirectUrl', 'mode'],
props: [
'signUpForceRedirectUrl',
'signUpFallbackRedirectUrl',
'fallbackRedirectUrl',
'forceRedirectUrl',
'mode',
'initialValues',
],
},
);
3 changes: 2 additions & 1 deletion packages/vue/src/components/SignUpButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type SignUpButtonProps = {
unsafeMetadata?: SignUpUnsafeMetadata;
} & Pick<
SignUpProps,
'fallbackRedirectUrl' | 'forceRedirectUrl' | 'signInForceRedirectUrl' | 'signInFallbackRedirectUrl'
'fallbackRedirectUrl' | 'forceRedirectUrl' | 'signInForceRedirectUrl' | 'signInFallbackRedirectUrl' | 'initialValues'
>;

export const SignUpButton = defineComponent(
Expand Down Expand Up @@ -51,6 +51,7 @@ export const SignUpButton = defineComponent(
'fallbackRedirectUrl',
'forceRedirectUrl',
'mode',
'initialValues',
],
},
);

0 comments on commit aeb5855

Please sign in to comment.