diff --git a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx index 2a0de96..8dfc4a9 100644 --- a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx +++ b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx @@ -2,9 +2,9 @@ import type { ComponentPropsWithoutRef } from 'react'; import React from 'react'; import ChevronRight from '@icons/ChevronRightThinComponent'; +import EditComponent from '@icons/EditComponent'; import classNames from 'classnames'; -import { Box } from '../box'; import { Icon as IconButton } from '../control-buttons'; import { Flex } from '../flex'; @@ -21,6 +21,7 @@ export type Props = Omit, 'type'> & { profile?: ProfileType; type: WalletType; onOpenAccountsMenu?: () => void; + onOpenEditWallet?: () => void; }; export const WalletOption = ({ @@ -32,6 +33,7 @@ export const WalletOption = ({ profile, type, onOpenAccountsMenu, + onOpenEditWallet, ...props }: Readonly): JSX.Element => { return ( @@ -53,15 +55,23 @@ export const WalletOption = ({ type={type} testId="wallet-option" /> - {type !== 'shared' && onOpenAccountsMenu && ( - - + + {onOpenEditWallet && ( + + { + onOpenEditWallet?.(); + event.stopPropagation(); + }} + icon={} + size="extraSmall" + as="div" + testId="wallet-option-edit-wallet-button" + /> + + )} + {type !== 'shared' && onOpenAccountsMenu && ( + { onOpenAccountsMenu?.(); @@ -73,8 +83,8 @@ export const WalletOption = ({ testId="wallet-option-accounts-menu-button" /> - - )} + )} + ); diff --git a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts index a25db1d..ce6de90 100644 --- a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts +++ b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts @@ -42,5 +42,3 @@ export const container = style([ }, }, ]); - -export const icon = style({}); diff --git a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx index 0c6f5ae..fd6e7cd 100644 --- a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx +++ b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx @@ -1,5 +1,6 @@ import React from 'react'; +import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; import { page, Variants, Section, UIStateTable } from '../decorators'; @@ -91,6 +92,45 @@ export const Overview = (): JSX.Element => ( +
+ + + + + + + + + + + + + + + +
+ + +
diff --git a/src/icons/EditComponent.tsx b/src/icons/EditComponent.tsx new file mode 100644 index 0000000..47ace02 --- /dev/null +++ b/src/icons/EditComponent.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import type { SVGProps } from 'react'; + +const SvgEditComponent = (props: SVGProps) => ( + + + +); +export default SvgEditComponent; diff --git a/src/icons/index.ts b/src/icons/index.ts index 7685023..969a5e8 100644 --- a/src/icons/index.ts +++ b/src/icons/index.ts @@ -78,3 +78,4 @@ export { default as WalletComponent } from './WalletComponent'; export { default as WarningIconCircleComponent } from './WarningIconCircleComponent'; export { default as WarningIconTriangleSolidComponent } from './WarningIconTriangleSolidComponent'; export { default as WarningIconTriangleComponent } from './WarningIconTriangleComponent'; +export { default as EditComponent } from './EditComponent'; diff --git a/src/icons/raw/edit.component.svg b/src/icons/raw/edit.component.svg new file mode 100644 index 0000000..8fdae38 --- /dev/null +++ b/src/icons/raw/edit.component.svg @@ -0,0 +1,3 @@ + + +