Skip to content

feat(astro): Add support for custom pages and links#3987

Merged
wobsoriano merged 6 commits intomainfrom
rob/eco-23-custom-pages-in-astro
Aug 22, 2024
Merged

feat(astro): Add support for custom pages and links#3987
wobsoriano merged 6 commits intomainfrom
rob/eco-23-custom-pages-in-astro

Conversation

@wobsoriano
Copy link
Member

Description

This PR adds support for custom pages and links in the <UserProfile /> Astro component. It implements the same behavior with the React counterpart:

Closes ECO-23

Usage:

<UserProfile>
    <!-- Custom page -->
    <UserProfile.Page label="Terms" url="terms">
        <div slot="label-icon">Icon</div>
        <div>
            <h1>Custom Terms Page</h1>
            <p>This is the custom terms page</p>
        </div>
    </UserProfile.Page>
    <!-- Custom link -->
    <UserProfile.Link label="Homepage" url="/">
        <div slot="label-icon">Home</div>
    </UserProfile.Link>
    <!-- Reorder default item -->
    <UserProfile.Page label="security" />
</UserProfile>

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot
Copy link

changeset-bot bot commented Aug 19, 2024

🦋 Changeset detected

Latest commit: 5b7b957

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/astro Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@panteliselef panteliselef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Copy link
Member

@anagstef anagstef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants