From 09a170bfe2a62acd4fc8e4208b3999aa3279c870 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Thu, 23 Feb 2023 15:19:23 -0600 Subject: [PATCH] UX: Icons: Remove icon-import (#17816) * UX: Icons: Remove icon-import * Add new icon --- app/images/icons/import.svg | 4 +- .../account-menu/account-menu.component.js | 6 +-- ui/components/ui/icon/icon-import.js | 47 ------------------- ui/components/ui/icon/icon.stories.js | 2 - 4 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 ui/components/ui/icon/icon-import.js diff --git a/app/images/icons/import.svg b/app/images/icons/import.svg index 8ce0942d6..a6b986d7a 100644 --- a/app/images/icons/import.svg +++ b/app/images/icons/import.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/ui/components/app/account-menu/account-menu.component.js b/ui/components/app/account-menu/account-menu.component.js index 880f93aa1..1805d7a5e 100644 --- a/ui/components/app/account-menu/account-menu.component.js +++ b/ui/components/app/account-menu/account-menu.component.js @@ -32,7 +32,6 @@ import { } from '../../../helpers/constants/routes'; import TextField from '../../ui/text-field'; import IconCog from '../../ui/icon/icon-cog'; -import IconImport from '../../ui/icon/icon-import'; import Button from '../../ui/button'; import SearchIcon from '../../ui/icon/search-icon'; @@ -394,10 +393,7 @@ export default class AccountMenu extends Component { history.push(IMPORT_ACCOUNT_ROUTE); }} icon={ - + } text={t('importAccount')} /> diff --git a/ui/components/ui/icon/icon-import.js b/ui/components/ui/icon/icon-import.js deleted file mode 100644 index bdc20f30d..000000000 --- a/ui/components/ui/icon/icon-import.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -/** - * @deprecated This has been deprecated in favour of the `` 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 IconImport = ({ - size = 24, - color = 'currentColor', - ariaLabel, - className, -}) => ( - - - -); - -IconImport.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 IconImport; diff --git a/ui/components/ui/icon/icon.stories.js b/ui/components/ui/icon/icon.stories.js index ee2939a42..ece776384 100644 --- a/ui/components/ui/icon/icon.stories.js +++ b/ui/components/ui/icon/icon.stories.js @@ -23,7 +23,6 @@ import Sign from './sign-icon.component'; import SunCheck from './sun-check-icon.component'; import Swap from './swap-icon-for-list.component'; import IconCog from './icon-cog'; -import IconImport from './icon-import'; import IconEye from './icon-eye'; import IconEyeSlash from './icon-eye-slash'; import IconTokenSearch from './icon-token-search'; @@ -116,7 +115,6 @@ export const DefaultStory = (args) => ( gridTemplateColumns: 'repeat(auto-fill, 176px)', }} > - } /> } /> } /> } />