Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/gentle-hats-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@clerk/astro": minor
"@clerk/nuxt": minor
"@clerk/vue": minor
---

Introduce `<APIKeys />` component
1 change: 1 addition & 0 deletions packages/astro/src/astro-components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ export { default as CreateOrganization } from './interactive/CreateOrganization.
export { default as GoogleOneTap } from './interactive/GoogleOneTap.astro';
export { default as Waitlist } from './interactive/Waitlist.astro';
export { default as PricingTable } from './interactive/PricingTable.astro';
export { default as APIKeys } from './interactive/APIKeys.astro';
11 changes: 11 additions & 0 deletions packages/astro/src/astro-components/interactive/APIKeys.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import type { APIKeysProps } from '@clerk/shared/types';
type Props = APIKeysProps;

import InternalUIComponentRenderer from './InternalUIComponentRenderer.astro';
---

<InternalUIComponentRenderer
{...Astro.props}
component='api-keys'
/>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const mountAllClerkAstroJSComponents = () => {
'google-one-tap': 'openGoogleOneTap',
waitlist: 'mountWaitlist',
'pricing-table': 'mountPricingTable',
'api-keys': 'mountAPIKeys',
} as const satisfies Record<InternalUIComponentId, keyof Clerk>;

Object.entries(mountFns).forEach(([category, mountFn]) => {
Expand Down
3 changes: 2 additions & 1 deletion packages/astro/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ export type InternalUIComponentId =
| 'user-profile'
| 'google-one-tap'
| 'waitlist'
| 'pricing-table';
| 'pricing-table'
| 'api-keys';
2 changes: 2 additions & 0 deletions packages/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export default defineNuxtModule<ModuleOptions>({
'SignedIn',
'SignedOut',
'Waitlist',
// API Keys Components
'APIKeys',
];
components.forEach(component => {
void addComponent({
Expand Down
1 change: 1 addition & 0 deletions packages/nuxt/src/runtime/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ export {
SignOutButton,
SignInWithMetamaskButton,
PricingTable,
APIKeys,
} from '@clerk/vue';
1 change: 1 addition & 0 deletions packages/vue/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export { default as Waitlist } from './ui-components/Waitlist.vue';
export { default as CreateOrganization } from './ui-components/CreateOrganization.vue';
export { default as OrganizationList } from './ui-components/OrganizationList.vue';
export { default as PricingTable } from './ui-components/PricingTable.vue';
export { default as APIKeys } from './ui-components/APIKeys.vue';
export { UserProfile } from './ui-components/UserProfile';
export { OrganizationProfile } from './ui-components/OrganizationProfile';
export { OrganizationSwitcher } from './ui-components/OrganizationSwitcher';
Expand Down
17 changes: 17 additions & 0 deletions packages/vue/src/components/ui-components/APIKeys.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup lang="ts">
import { ClerkHostRenderer } from '../ClerkHostRenderer';
import type { APIKeysProps } from '@clerk/shared/types';
import { useClerk } from '../../composables';

const clerk = useClerk();
const props = defineProps<APIKeysProps>();
</script>

<template>
<ClerkHostRenderer
:mount="clerk?.mountAPIKeys"
:unmount="clerk?.unmountAPIKeys"
:update-props="(clerk as any)?.__unstable__updateProps"
:props="props"
/>
</template>
Loading