From cf0bc662c1e59ea69a2484238c61b5eaccba70a3 Mon Sep 17 00:00:00 2001 From: George Marshall Date: Fri, 25 Mar 2022 10:59:22 -0700 Subject: [PATCH] Dark mdoe: token search icon (#14213) --- app/images/tokensearch.svg | 6 --- ui/components/ui/icon/icon-token-search.js | 42 +++++++++++++++++++ ui/components/ui/icon/icon.stories.js | 9 +++- .../token-list-placeholder.component.js | 3 +- 4 files changed, 51 insertions(+), 9 deletions(-) delete mode 100644 app/images/tokensearch.svg create mode 100644 ui/components/ui/icon/icon-token-search.js diff --git a/app/images/tokensearch.svg b/app/images/tokensearch.svg deleted file mode 100644 index 89a839602..000000000 --- a/app/images/tokensearch.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/ui/components/ui/icon/icon-token-search.js b/ui/components/ui/icon/icon-token-search.js new file mode 100644 index 000000000..2b4151a72 --- /dev/null +++ b/ui/components/ui/icon/icon-token-search.js @@ -0,0 +1,42 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const IconTokenSearch = ({ + size = 24, + color = 'currentColor', + ariaLabel, + className, +}) => ( + + + +); + +IconTokenSearch.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 IconTokenSearch; diff --git a/ui/components/ui/icon/icon.stories.js b/ui/components/ui/icon/icon.stories.js index 3439bcafe..2a2d5b3b6 100644 --- a/ui/components/ui/icon/icon.stories.js +++ b/ui/components/ui/icon/icon.stories.js @@ -37,6 +37,7 @@ import IconSpeechBubbles from './icon-speech-bubbles'; import IconPlus from './icon-plus'; import IconEye from './icon-eye'; import IconEyeSlash from './icon-eye-slash'; +import IconTokenSearch from './icon-token-search'; const validColors = [ 'var(--color-icon-default)', @@ -100,8 +101,11 @@ export const DefaultStory = (args) => ( Icons - If you are creating a new icon please use the ./icon-caret-left.js as the - template + To ensure correct licensing we suggest you use an icon from the + @fortawesome/fontawesome-free: ^5.13.0 package. If there is no icon to + suit your needs and you need to create a new one. Ensure that it has the + correct licensing or has been created in house from scratch. Please use + the ./icon-caret-left.js as the template.
( } /> } /> } /> + } />
- +
{this.context.t('addAcquiredTokens')}