1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

UX: Icon: Remove Plus icon (#17666)

This commit is contained in:
David Walsh 2023-02-16 07:26:26 -06:00 committed by GitHub
parent 4dcb639652
commit 74ef8e4fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 52 deletions

View File

@ -890,7 +890,6 @@
"ui/components/ui/icon/icon-eye-slash.js", "ui/components/ui/icon/icon-eye-slash.js",
"ui/components/ui/icon/icon-eye.js", "ui/components/ui/icon/icon-eye.js",
"ui/components/ui/icon/icon-import.js", "ui/components/ui/icon/icon-import.js",
"ui/components/ui/icon/icon-plus.js",
"ui/components/ui/icon/icon-token-search.js", "ui/components/ui/icon/icon-token-search.js",
"ui/components/ui/icon/icon.stories.js", "ui/components/ui/icon/icon.stories.js",
"ui/components/ui/icon/info-icon-inverted.component.js", "ui/components/ui/icon/info-icon-inverted.component.js",

View File

@ -33,7 +33,6 @@ import {
import TextField from '../../ui/text-field'; import TextField from '../../ui/text-field';
import IconCheck from '../../ui/icon/icon-check'; import IconCheck from '../../ui/icon/icon-check';
import IconCog from '../../ui/icon/icon-cog'; import IconCog from '../../ui/icon/icon-cog';
import IconPlus from '../../ui/icon/icon-plus';
import IconImport from '../../ui/icon/icon-import'; import IconImport from '../../ui/icon/icon-import';
import Button from '../../ui/button'; import Button from '../../ui/button';
@ -375,7 +374,13 @@ export default class AccountMenu extends Component {
}); });
history.push(NEW_ACCOUNT_ROUTE); history.push(NEW_ACCOUNT_ROUTE);
}} }}
icon={<IconPlus color="var(--color-icon-alternative)" />} icon={
<Icon
name={ICON_NAMES.ADD}
color={Color.iconAlternative}
ariaLabel={t('createAccount')}
/>
}
text={t('createAccount')} text={t('createAccount')}
/> />
<AccountMenuItem <AccountMenuItem

View File

@ -1,47 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
/**
* @deprecated This has been deprecated in favour of the `<Icon />` component in ./ui/components/component-library/icon/icon.js
* See storybook documentation for Icon here https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-icon--default-story#icon
*/
const IconPlus = ({
size = 24,
color = 'currentColor',
ariaLabel,
className,
}) => (
<svg
width={size}
height={size}
fill={color}
className={className}
aria-label={ariaLabel}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path d="m277 107c0-12-9-22-21-22-12 0-21 10-21 22l0 128-128 0c-12 0-22 9-22 21 0 12 10 21 22 21l128 0 0 128c0 12 9 22 21 22 12 0 21-10 21-22l0-128 128 0c12 0 22-9 22-21 0-12-10-21-22-21l-128 0z" />
</svg>
);
IconPlus.propTypes = {
/**
* The size of the Icon follows an 8px grid 2 = 16px, 3 = 24px etc
*/
size: PropTypes.number,
/**
* The color of the icon accepts design token css variables
*/
color: PropTypes.string,
/**
* An additional className to assign the Icon
*/
className: PropTypes.string,
/**
* The aria-label of the icon for accessibility purposes
*/
ariaLabel: PropTypes.string,
};
export default IconPlus;

View File

@ -25,7 +25,6 @@ import Swap from './swap-icon-for-list.component';
import IconCheck from './icon-check'; import IconCheck from './icon-check';
import IconCog from './icon-cog'; import IconCog from './icon-cog';
import IconImport from './icon-import'; import IconImport from './icon-import';
import IconPlus from './icon-plus';
import IconEye from './icon-eye'; import IconEye from './icon-eye';
import IconEyeSlash from './icon-eye-slash'; import IconEyeSlash from './icon-eye-slash';
import IconTokenSearch from './icon-token-search'; import IconTokenSearch from './icon-token-search';
@ -119,7 +118,6 @@ export const DefaultStory = (args) => (
}} }}
> >
<IconItem Component={<IconCheck {...args} />} /> <IconItem Component={<IconCheck {...args} />} />
<IconItem Component={<IconPlus {...args} />} />
<IconItem Component={<IconImport {...args} />} /> <IconItem Component={<IconImport {...args} />} />
<IconItem Component={<IconCog {...args} />} /> <IconItem Component={<IconCog {...args} />} />
<IconItem Component={<IconTokenSearch {...args} />} /> <IconItem Component={<IconTokenSearch {...args} />} />