mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
MenuItem: Fix layout of menu item with subtitle (#17650)
This commit is contained in:
parent
1f9b5a2293
commit
1e5f9da592
@ -109,7 +109,7 @@ describe('Dapp interactions', function () {
|
|||||||
await driver.clickElement(
|
await driver.clickElement(
|
||||||
'[data-testid ="account-options-menu-button"]',
|
'[data-testid ="account-options-menu-button"]',
|
||||||
);
|
);
|
||||||
await driver.clickElement({ text: 'Connected sites', tag: 'span' });
|
await driver.clickElement({ text: 'Connected sites', tag: 'div' });
|
||||||
const connectedDapp1 = await driver.isElementPresent({
|
const connectedDapp1 = await driver.isElementPresent({
|
||||||
text: 'http://127.0.0.1:8080',
|
text: 'http://127.0.0.1:8080',
|
||||||
tag: 'bdi',
|
tag: 'bdi',
|
||||||
|
@ -36,7 +36,7 @@ describe('Token Details', function () {
|
|||||||
await driver.clickElement({ text: 'Add custom token', tag: 'button' });
|
await driver.clickElement({ text: 'Add custom token', tag: 'button' });
|
||||||
await driver.clickElement({ text: 'Import tokens', tag: 'button' });
|
await driver.clickElement({ text: 'Import tokens', tag: 'button' });
|
||||||
await driver.clickElement('[aria-label="Asset options"]');
|
await driver.clickElement('[aria-label="Asset options"]');
|
||||||
await driver.clickElement({ text: 'Token details', tag: 'span' });
|
await driver.clickElement({ text: 'Token details', tag: 'div' });
|
||||||
|
|
||||||
const tokenAddressFound = {
|
const tokenAddressFound = {
|
||||||
text: tokenAddress,
|
text: tokenAddress,
|
||||||
|
@ -20,8 +20,10 @@ const MenuItem = ({
|
|||||||
{iconName ? (
|
{iconName ? (
|
||||||
<Icon name={iconName} size={ICON_SIZES.SM} marginRight={2} />
|
<Icon name={iconName} size={ICON_SIZES.SM} marginRight={2} />
|
||||||
) : null}
|
) : null}
|
||||||
<span>{children}</span>
|
<div>
|
||||||
{subtitle}
|
<div>{children}</div>
|
||||||
|
{subtitle ? <div>{subtitle}</div> : null}
|
||||||
|
</div>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user