Closed wobsoriano closed 1 month ago
This PR adds support for custom menu items in <UserButton /> component!
<UserButton />
<UserButton afterSignOutUrl="/"> <UserButton.MenuItems> <!-- <UserButton.Action label="signOut" onclick={() => {}} /> --> <UserButton.Action label="Help" labelIcon={Icon} open="help" /> <UserButton.Action label="Open chat" onclick={() => { console.log('init chat'); }} > {#snippet labelIcon()} <Icon /> {/snippet} </UserButton.Action> <UserButton.Link label="Profile" href="/profile" labelIcon={Icon} /> </UserButton.MenuItems> <UserButton.UserProfilePage label="Help" url="help"> {#snippet labelIcon()} <Icon /> {/snippet} <div> <h1>Help Page</h1> <p>This is the custom help page</p> </div> </UserButton.UserProfilePage> </UserButton>
This PR adds support for custom menu items in
<UserButton />
component!