Skip to content

Commit 1b5f703

Browse files
nmetulevJustinXinLiu
authored andcommitted
[mgt-login] fixes signout bug and adds more css custom properties (#225)
* * Fixes an issue with signout if signout is not available on provider * Adds additional css custom properties to allow styleing color on hover
1 parent d78d2c1 commit 1b5f703

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/mgt-login/mgt-login.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ mgt-login {
1616
--height: '100%';
1717
--margin: 0;
1818
--padding: 12px 20px;
19-
--color: #{$ms-color-neutralDark};
19+
--color: #{$ms-color-neutralPrimary};
20+
--color-hover: var(--theme-primary-color);
2021
--background-color: transparent;
2122
--background-color--hover: #{$ms-color-neutralLight};
2223
--popup-content-background-color: white;
2324
--popup-command-font-size: #{$ms-font-size-s};
2425
--popup-command-margin: 16px 0 0;
2526
--popup-padding: 24px 48px 16px 24px;
27+
--popup-color: #{$ms-color-neutralPrimary};
2628
}
2729

2830
:host .root,
@@ -49,7 +51,8 @@ mgt-login .login-button {
4951
transition: color 0.3s, background-color 0.3s;
5052

5153
&:hover {
52-
color: var(--theme-primary-color);
54+
color: var(--color-hover);
55+
--color: var(--color-hover);
5356
background-color: var(--background-color--hover);
5457
}
5558

@@ -80,6 +83,8 @@ mgt-login .popup {
8083
box-shadow: 0 12px 40px 2px rgba(0, 0, 0, 0.08);
8184
min-width: 240px;
8285
z-index: 1;
86+
color: var(--popup-color);
87+
--color: var(--popup-color);
8388

8489
&.show-menu {
8590
display: inline-block;

src/components/mgt-login/mgt-login.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ export class MgtLogin extends MgtBaseComponent {
104104
const provider = Providers.globalProvider;
105105
if (provider && provider.logout) {
106106
await provider.logout();
107+
this.userDetails = null;
108+
this._showMenu = false;
107109
this.fireCustomEvent('logoutCompleted');
108110
}
109-
110-
this.userDetails = null;
111-
this._showMenu = false;
112111
}
113112

114113
/**

0 commit comments

Comments
 (0)