1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Make the accounts menu accessible (#14936)

This commit is contained in:
David Walsh 2022-06-15 12:49:18 -05:00 committed by GitHub
parent f5c6d0054f
commit ea49b40d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 6 deletions

View File

@ -50,13 +50,13 @@ export function AccountMenuItem(props) {
{children}
</div>
) : (
<div className={itemClassName} onClick={onClick}>
<button className={itemClassName} onClick={onClick}>
{icon ? <div className="account-menu__item__icon">{icon}</div> : null}
{text ? <div className="account-menu__item__text">{text}</div> : null}
{subText ? (
<div className="account-menu__item__subtext">{subText}</div>
) : null}
</div>
</button>
);
}
@ -200,7 +200,7 @@ export default class AccountMenu extends Component {
const iconAndNameForOpenSubject = addressSubjects[originOfCurrentTab];
return (
<div
<button
className="account-menu__account account-menu__item--clickable"
onClick={() => {
this.context.trackEvent({
@ -239,7 +239,7 @@ export default class AccountMenu extends Component {
/>
</div>
) : null}
</div>
</button>
);
});
}

View File

@ -32,6 +32,9 @@
align-items: center;
position: relative;
z-index: 201;
border: 0;
background: none;
width: 100%;
@media screen and (max-width: $break-small) {
padding: 14px;
@ -63,6 +66,8 @@
&__text {
@include Paragraph;
color: var(--color-text-default);
}
&__subtext {
@ -182,6 +187,9 @@
flex-flow: row nowrap;
padding: 16px 14px;
flex: 0 0 auto;
background: none;
border: 0;
width: 100%;
@media screen and (max-width: $break-small) {
padding: 12px 14px;
@ -230,6 +238,7 @@
overflow: hidden;
white-space: nowrap;
max-width: 200px;
text-align: start;
}
&__balance {

View File

@ -76,7 +76,7 @@ export default class AppHeader extends PureComponent {
return (
isUnlocked && (
<div
<button
className={classnames('account-menu__icon', {
'account-menu__icon--disabled': disabled,
})}
@ -105,7 +105,7 @@ export default class AppHeader extends PureComponent {
)
///: END:ONLY_INCLUDE_IN
}
</div>
</button>
)
);
}

View File

@ -89,6 +89,8 @@
.account-menu__icon {
position: relative;
border: 0;
background: none;
&__notification-count {
position: absolute;