Skip to content

Logout Button from MSAL in TopNavigation #721

Answered by rubencarvalho
jkintner25 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Jeffrey, thank you for reaching out.

Our Top Navigation component doesn't support a custom component to be used in the menu-dropdown.

Alternatively, I'd recommend you to use our supported button inside the menu-dropdown. It has a onClick property that specifies the event handler called when the utility is clicked. You could then use this to trigger your custom handleLogout logic.

Here's how it could look like:

          {
            type: 'button',
            variant: 'primary-button',
            text: 'Log out',
            onClick: () => handleLogout("popup"),
          },

Let me know if there's any other question you have.

Thank you!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jkintner25
Comment options

@jkintner25
Comment options

@jkintner25
Comment options

@dinaftc
Comment options

Answer selected by jkintner25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants