diff --git a/app/images/down-arrow.svg b/app/images/down-arrow.svg deleted file mode 100644 index 9d367dfc9..000000000 --- a/app/images/down-arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/app/images/level-arrow.svg b/app/images/level-arrow.svg deleted file mode 100644 index 73101e560..000000000 --- a/app/images/level-arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/app/images/up-arrow.svg b/app/images/up-arrow.svg deleted file mode 100644 index 76449fe0d..000000000 --- a/app/images/up-arrow.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js index 51739f704..ddc0fd1ad 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js @@ -1,5 +1,6 @@ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; +import classnames from 'classnames'; import { isNullish } from '../../../../helpers/utils/util'; import { formatGasFeeOrFeeRange } from '../../../../helpers/utils/gas'; @@ -11,21 +12,21 @@ function determineTrendInfo(trend, t) { switch (trend) { case 'up': return { - className: 'advanced-gas-fee-input-subtext__up', - imageSrc: '/images/up-arrow.svg', - imageAlt: t('upArrow'), + className: 'fa-arrow-up advanced-gas-fee-input-subtext__up', + color: 'var(--color-success-default)', + title: t('upArrow'), }; case 'down': return { - className: 'advanced-gas-fee-input-subtext__down', - imageSrc: '/images/down-arrow.svg', - imageAlt: t('downArrow'), + className: 'fa-arrow-down advanced-gas-fee-input-subtext__down', + color: 'var(--color-error-default)', + title: t('downArrow'), }; case 'level': return { - className: 'advanced-gas-fee-input-subtext__level', - imageSrc: '/images/level-arrow.svg', - imageAlt: t('levelArrow'), + className: 'fa-arrow-right advanced-gas-fee-input-subtext__level', + color: 'var(--color-icon-default)', + title: t('levelArrow'), }; default: return null; @@ -52,10 +53,11 @@ const AdvancedGasFeeInputSubtext = ({ latest, historical, trend }) => { {formatGasFeeOrFeeRange(latest)} {trendInfo === null ? null : ( - - {trendInfo.imageAlt} + diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.test.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.test.js index 5d779b669..fd9f3994d 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.test.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.test.js @@ -45,7 +45,7 @@ describe('AdvancedGasFeeInputSubtext', () => { }, }); - expect(screen.getByAltText('up arrow')).toBeInTheDocument(); + expect(screen.getByTitle('up arrow')).toBeInTheDocument(); }); it('should render a fee trend arrow image if given "down" as the trend', () => { @@ -56,7 +56,7 @@ describe('AdvancedGasFeeInputSubtext', () => { }, }); - expect(screen.getByAltText('down arrow')).toBeInTheDocument(); + expect(screen.getByTitle('down arrow')).toBeInTheDocument(); }); it('should render a fee trend arrow image if given "level" as the trend', () => { @@ -67,7 +67,7 @@ describe('AdvancedGasFeeInputSubtext', () => { }, }); - expect(screen.getByAltText('level arrow')).toBeInTheDocument(); + expect(screen.getByTitle('level arrow')).toBeInTheDocument(); }); it('should not render a fee trend arrow image if given an invalid trend', () => { diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index.scss b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index.scss index 40240d88e..28ef01527 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index.scss +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index.scss @@ -21,7 +21,7 @@ padding-top: 2px; } - img { + &__icon { margin-right: 8px; } }