Skip to content

Commit

Permalink
chore: lint format
Browse files Browse the repository at this point in the history
  • Loading branch information
nikospapcom committed Oct 24, 2024
1 parent a9371ed commit d3e54a5
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions docs/customization/user-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ The following example demonstrates how to add a link to the `<UserButton />` com
</Tab>
</Tabs>


### JavaScript example

To add custom menu items to the `<UserButton />` component using the [JavaScript SDK](/docs/references/javascript/overview), you can pass the `customMenuItems` property to the `mountUserButton` method, as shown in the following example:
Expand All @@ -340,13 +339,12 @@ To add custom menu items to the `<UserButton />` component using the [JavaScript
clerk.mountUserButton(userButtonDiv, {
customMenuItems: [
{
label: "User page",
href: "/user",
label: 'User page',
href: '/user',
mountIcon: (el) => {
el.innerHTML = "👤";
},
unmountIcon: (el) => {
el.innerHTML = '👤'
},
unmountIcon: (el) => {},
},
],
})
Expand Down Expand Up @@ -375,13 +373,12 @@ To add custom menu items to the `<UserButton />` component using the [JavaScript
Clerk.mountUserButton(userButtonDiv, {
customMenuItems: [
{
label: "User page",
href: "/user",
label: 'User page',
href: '/user',
mountIcon: (el) => {
el.innerHTML = "👤";
},
unmountIcon: (el) => {
el.innerHTML = '👤'
},
unmountIcon: (el) => {},
},
],
})
Expand All @@ -390,7 +387,6 @@ To add custom menu items to the `<UserButton />` component using the [JavaScript
```
</CodeBlockTabs>


## Reorder default items

The `<UserButton />` component includes two default menu items: `Manage account` and `Sign out`. You can reorder these default items by setting the `label` prop to `'manageAccount'` or `'signOut'`. This will target the existing default item and allow you to rearrange it, as shown in the following example:
Expand Down

0 comments on commit d3e54a5

Please sign in to comment.