Skip to content

Commit

Permalink
chore(vue): Expose initialValues prop within <SignInButton /> and…
Browse files Browse the repository at this point in the history
… `<#Button />` (#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 `<#Button />` 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' | '#ForceRedirectUrl' | '#FallbackRedirectUrl'
'fallbackRedirectUrl' | 'forceRedirectUrl' | '#ForceRedirectUrl' | '#FallbackRedirectUrl' | 'initialValues'
>;

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

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

0 comments on commit aeb5855

Please # to comment.