1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

added tooltip (#19269)

This commit is contained in:
Nidhi Kumari 2023-05-25 19:00:01 +05:30 committed by GitHub
parent 9375e3810f
commit f0be1c3dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 14 deletions

View File

@ -57,6 +57,7 @@ import ConnectedStatusIndicator from '../../app/connected-status-indicator';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { getCompletedOnboarding } from '../../../ducks/metamask/metamask';
import { getSendStage, SEND_STAGES } from '../../../ducks/send';
import Tooltip from '../../ui/tooltip';
export const AppHeader = ({ location }) => {
const trackEvent = useContext(MetaMetricsContext);
@ -175,20 +176,25 @@ export const AppHeader = ({ location }) => {
paddingRight={4}
gap={2}
>
<AvatarNetwork
className="multichain-app-header__contents--avatar-network"
ref={menuRef}
as="button"
aria-label={t('networkMenu')}
padding={0}
name={currentNetwork?.nickname}
src={currentNetwork?.rpcPrefs?.imageUrl}
size={Size.SM}
onClick={networkOpenCallback}
display={[DISPLAY.FLEX, DISPLAY.NONE]} // show on popover hide on desktop
disabled={disableNetworkPicker}
/>
{popupStatus ? null : (
{popupStatus ? (
<Box className="multichain-app-header__contents__container">
<Tooltip title={currentNetwork?.nickname} position="right">
<AvatarNetwork
className="multichain-app-header__contents--avatar-network"
ref={menuRef}
as="button"
aria-label={t('networkMenu')}
padding={0}
name={currentNetwork?.nickname}
src={currentNetwork?.rpcPrefs?.imageUrl}
size={Size.SM}
onClick={networkOpenCallback}
display={[DISPLAY.FLEX, DISPLAY.NONE]} // show on popover hide on desktop
disabled={disableNetworkPicker}
/>
</Tooltip>
</Box>
) : (
<div>
<PickerNetwork
margin={2}

View File

@ -36,6 +36,10 @@
&--avatar-network {
padding: 0; // TODO: Remove once https://github.com/MetaMask/metamask-extension/pull/17006 is merged
}
&__container {
width: fit-content;
}
}
&__lock-contents {