diff --git a/.changeset/user-profile-delete-section.md b/.changeset/user-profile-delete-section.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/user-profile-delete-section.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/swingset/src/components/DocsViewer.tsx b/packages/swingset/src/components/DocsViewer.tsx index 65395de1a63..f8bf384387a 100644 --- a/packages/swingset/src/components/DocsViewer.tsx +++ b/packages/swingset/src/components/DocsViewer.tsx @@ -17,6 +17,7 @@ const docModules: Record> = { () => import('../stories/user-profile-connected-accounts-section.mdx'), ), 'user-profile-web3wallets-section': dynamic(() => import('../stories/user-profile-web3-wallets-section.mdx')), + 'user-profile-delete-section': dynamic(() => import('../stories/user-profile-delete-section.mdx')), }, components: { avatar: dynamic(() => import('../stories/avatar.mdx')), diff --git a/packages/swingset/src/lib/registry.ts b/packages/swingset/src/lib/registry.ts index 0ba56d63898..fc7af58431b 100644 --- a/packages/swingset/src/lib/registry.ts +++ b/packages/swingset/src/lib/registry.ts @@ -104,6 +104,10 @@ import { Default as UserProfileConnectedAccountsSectionDefault, meta as userProfileConnectedAccountsSectionMeta, } from '../stories/user-profile-connected-accounts-section.stories'; +import { + Default as UserProfileDeleteSectionDefault, + meta as userProfileDeleteSectionMeta, +} from '../stories/user-profile-delete-section.stories'; import { Default as UserProfileWeb3WalletsSectionDefault, meta as userProfileWeb3WalletsSectionMeta, @@ -228,6 +232,10 @@ const userProfileWeb3WalletsSectionModule: StoryModule = { meta: userProfileWeb3WalletsSectionMeta, Default: UserProfileWeb3WalletsSectionDefault, }; +const userProfileDeleteSectionModule: StoryModule = { + meta: userProfileDeleteSectionMeta, + Default: UserProfileDeleteSectionDefault, +}; export const registry: StoryModule[] = [ // User @@ -235,6 +243,7 @@ export const registry: StoryModule[] = [ userProfileAccountSectionModule, userProfileConnectedAccountsSectionModule, userProfileWeb3WalletsSectionModule, + userProfileDeleteSectionModule, // Components avatarModule, badgeModule, diff --git a/packages/swingset/src/stories/user-profile-delete-section.mdx b/packages/swingset/src/stories/user-profile-delete-section.mdx new file mode 100644 index 00000000000..e6ca07a140b --- /dev/null +++ b/packages/swingset/src/stories/user-profile-delete-section.mdx @@ -0,0 +1,14 @@ +import * as Stories from './user-profile-delete-section.stories'; + +# UserProfileDeleteSection + +The terminal destructive action for deleting the current user account. + + diff --git a/packages/swingset/src/stories/user-profile-delete-section.stories.tsx b/packages/swingset/src/stories/user-profile-delete-section.stories.tsx new file mode 100644 index 00000000000..9c316bf4ed8 --- /dev/null +++ b/packages/swingset/src/stories/user-profile-delete-section.stories.tsx @@ -0,0 +1,15 @@ +import { UserProfileDeleteSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-delete-section.view'; + +import type { StoryMeta } from '@/lib/types'; + +export { default as __source } from './user-profile-delete-section.stories?raw'; + +export const meta: StoryMeta = { + group: 'User', + title: 'UserProfileDeleteSection', + source: 'packages/ui/src/mosaic/user-profile/user-profile-delete-section.view.tsx', +}; + +export function Default() { + return undefined} />; +} diff --git a/packages/ui/src/mosaic/user-profile/user-profile-delete-section.view.tsx b/packages/ui/src/mosaic/user-profile/user-profile-delete-section.view.tsx new file mode 100644 index 00000000000..ba2e5cb5b6b --- /dev/null +++ b/packages/ui/src/mosaic/user-profile/user-profile-delete-section.view.tsx @@ -0,0 +1,36 @@ +import { Button } from '../components/button'; +import { Section } from '../components/section'; + +export interface UserProfileDeleteSectionViewProps { + onDelete: () => void; +} + +export function UserProfileDeleteSectionView({ onDelete }: UserProfileDeleteSectionViewProps) { + return ( + + Danger zone + + + + + Delete account + + Permanently delete this profile and all its data. This cannot be undone. + + + + + + + + + + ); +}