mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
* Fix #17362 - Ensure NFT icons are correct * Update trash icon
This commit is contained in:
parent
b21e0df4fa
commit
6ee2d07706
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
||||
|
||||
import { I18nContext } from '../../../contexts/i18n';
|
||||
import { Menu, MenuItem } from '../../ui/menu';
|
||||
import { ICON_NAMES } from '../../component-library';
|
||||
|
||||
const CollectibleOptions = ({ onRemove, onViewOnOpensea }) => {
|
||||
const t = useContext(I18nContext);
|
||||
@ -25,7 +26,7 @@ const CollectibleOptions = ({ onRemove, onViewOnOpensea }) => {
|
||||
>
|
||||
{onViewOnOpensea ? (
|
||||
<MenuItem
|
||||
iconClassName="fas fa-qrcode"
|
||||
iconName={ICON_NAMES.EXPORT}
|
||||
data-testid="collectible-options__view-on-opensea"
|
||||
onClick={() => {
|
||||
setCollectibleOptionsOpen(false);
|
||||
@ -36,7 +37,7 @@ const CollectibleOptions = ({ onRemove, onViewOnOpensea }) => {
|
||||
</MenuItem>
|
||||
) : null}
|
||||
<MenuItem
|
||||
iconClassName="fas fa-trash-alt collectible-options__icon"
|
||||
iconName={ICON_NAMES.TRASH}
|
||||
data-testid="collectible-options__hide"
|
||||
onClick={() => {
|
||||
setCollectibleOptionsOpen(false);
|
||||
|
@ -2,11 +2,14 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import { Icon, ICON_SIZES } from '../../component-library';
|
||||
|
||||
const MenuItem = ({
|
||||
children,
|
||||
className,
|
||||
'data-testid': dataTestId,
|
||||
iconClassName,
|
||||
iconName,
|
||||
onClick,
|
||||
subtitle,
|
||||
}) => (
|
||||
@ -18,6 +21,9 @@ const MenuItem = ({
|
||||
{iconClassName ? (
|
||||
<i className={classnames('menu-item__icon', iconClassName)} />
|
||||
) : null}
|
||||
{iconName ? (
|
||||
<Icon name={iconName} size={ICON_SIZES.SM} marginRight={2} />
|
||||
) : null}
|
||||
<span>{children}</span>
|
||||
{subtitle}
|
||||
</button>
|
||||
@ -28,6 +34,7 @@ MenuItem.propTypes = {
|
||||
className: PropTypes.string,
|
||||
'data-testid': PropTypes.string,
|
||||
iconClassName: PropTypes.string,
|
||||
iconName: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
subtitle: PropTypes.node,
|
||||
};
|
||||
@ -36,6 +43,7 @@ MenuItem.defaultProps = {
|
||||
className: undefined,
|
||||
'data-testid': undefined,
|
||||
iconClassName: undefined,
|
||||
iconName: undefined,
|
||||
onClick: undefined,
|
||||
subtitle: undefined,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user