1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 07:16:36 +01:00
metamask-extension/ui/components/multichain/account-list-item-menu/account-list-item-menu.stories.js
Garrett Bear 70d86ee67c
Feat/19274/ds popover update account list menu (#19534)
* update account list menu to use ds popover and fix accessibility issue

* close popover if user continues to tab to next items

* remove disable logic not doing anything

* add stylesheet

* add refs to track last menuitem

* cleaned up ref version for MenuItems

* fix test

* add click away option and fix test

* fix e2e test

* undo e2e test

* add account e2e

* fix click outside component

* remove additional line break

* remove commented out code

* add isOpen to story

* set width to 225px
2023-06-16 09:25:13 -07:00

46 lines
978 B
JavaScript

import React from 'react';
import { AccountListItemMenu } from '.';
export default {
title: 'Components/Multichain/AccountListItemMenu',
component: AccountListItemMenu,
argTypes: {
anchorElement: {
control: 'window.Element',
},
onClose: {
action: 'onClose',
},
closeMenu: {
action: 'closeMenu',
},
blockExplorerUrlSubTitle: {
control: 'text',
},
isRemovable: {
control: 'boolean',
},
identity: {
control: 'object',
},
isOpen: {
control: 'boolean',
},
},
args: {
anchorElement: null,
identity: {
address: '0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e',
name: 'Account 1',
balance: '0x152387ad22c3f0',
tokenBalance: '32.09 ETH',
},
isRemovable: true,
blockExplorerUrlSubTitle: 'etherscan.io',
isOpen: true,
},
};
export const DefaultStory = (args) => <AccountListItemMenu {...args} />;
DefaultStory.storyName = 'Default';