Styles, set focus to sidebar on open

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
strip-front-mentions
marcin mikołajczak 2021-10-26 11:26:58 +02:00
rodzic 916bf7a634
commit 4bc3a0c7dc
4 zmienionych plików z 13 dodań i 2 usunięć

Wyświetl plik

@ -141,6 +141,10 @@ class SidebarMenu extends ImmutablePureComponent {
if (accountChanged || otherAccountsChanged) { if (accountChanged || otherAccountsChanged) {
this.fetchOwnAccounts(); this.fetchOwnAccounts();
} }
if (this.props.sidebarOpen && !prevProps.sidebarOpen) {
document.querySelector('.sidebar-menu__close').focus();
}
} }
renderAccount = account => { renderAccount = account => {

Wyświetl plik

@ -202,7 +202,8 @@
padding: 7px; padding: 7px;
opacity: 0.6; opacity: 0.6;
&:hover { &:hover,
&:focus {
opacity: 1; opacity: 1;
} }

Wyświetl plik

@ -173,7 +173,8 @@
clear: both; clear: both;
text-decoration: none; text-decoration: none;
&:hover { &:hover,
&:focus {
background: var(--brand-color--faint); background: var(--brand-color--faint);
} }
} }

Wyświetl plik

@ -154,6 +154,11 @@
justify-content: center; justify-content: center;
color: var(--primary-text-color--faint); color: var(--primary-text-color--faint);
&:hover,
&:focus {
color: var(--primary-text-color);
}
.svg-icon { .svg-icon {
margin-right: 7px; margin-right: 7px;
width: 22px; width: 22px;