diff --git a/ui/components/app/advanced-gas-inputs/advanced-gas-inputs.component.js b/ui/components/app/advanced-gas-inputs/advanced-gas-inputs.component.js index cda7f4d73..1cfd8b7e5 100644 --- a/ui/components/app/advanced-gas-inputs/advanced-gas-inputs.component.js +++ b/ui/components/app/advanced-gas-inputs/advanced-gas-inputs.component.js @@ -3,6 +3,8 @@ import PropTypes from 'prop-types'; import classnames from 'classnames'; import { debounce } from 'lodash'; import Tooltip from '../../ui/tooltip'; +import { Icon, IconName } from '../../component-library'; +import { IconColor } from '../../../helpers/constants/design-system'; export default class AdvancedGasInputs extends Component { static contextTypes = { @@ -138,7 +140,11 @@ export default class AdvancedGasInputs extends Component {
{label} - +
diff --git a/ui/components/app/advanced-gas-inputs/index.scss b/ui/components/app/advanced-gas-inputs/index.scss index 1f1630485..cc472897f 100644 --- a/ui/components/app/advanced-gas-inputs/index.scss +++ b/ui/components/app/advanced-gas-inputs/index.scss @@ -22,12 +22,11 @@ @include H8; } - .fa-info-circle { - color: var(--color-icon-alternative); + .info-circle { cursor: pointer; } - .fa-info-circle:hover { + .info-circle:hover { color: var(--color-icon-muted); } } diff --git a/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js index cbcac50eb..1a64b0aa0 100644 --- a/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js +++ b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js @@ -22,6 +22,7 @@ import Checkbox from '../../../ui/check-box'; import Tooltip from '../../../ui/tooltip'; import ConnectedAccountsList from '../../connected-accounts-list'; import { useI18nContext } from '../../../../hooks/useI18nContext'; +import { Icon, IconName } from '../../../component-library'; const { ERROR, LOADING } = ALERT_STATE; @@ -68,7 +69,7 @@ const UnconnectedAccountAlert = () => { title={t('alertDisableTooltip')} wrapperClassName="unconnected-account-alert__checkbox-label-tooltip" > - +
diff --git a/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js b/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js index b5dcc0abe..c09ad91ac 100644 --- a/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js +++ b/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js @@ -26,6 +26,7 @@ import { import { useDraftTransactionGasValues } from '../../../../hooks/useDraftTransactionGasValues'; import { getNativeCurrency } from '../../../../ducks/metamask/metamask'; import MultilayerFeeMessage from '../../multilayer-fee-message/multi-layer-fee-message'; +import { Icon, IconName } from '../../../component-library'; const renderHeartBeatIfNotInTest = () => process.env.IN_TEST ? null : ; @@ -95,7 +96,7 @@ const ConfirmLegacyGasDisplay = () => { contentText={t('transactionDetailDappGasTooltip')} position="top" > - + ) : ( @@ -123,7 +124,7 @@ const ConfirmLegacyGasDisplay = () => { } position="top" > - + ) diff --git a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js index 5c4f5d632..e8d4402e8 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js @@ -1,10 +1,16 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { Icon, IconName } from '../../../../component-library'; +import { IconColor } from '../../../../../helpers/constants/design-system'; const ConfirmPageContainerWarning = (props) => { return (
- +
{props.warning}
diff --git a/ui/components/app/home-notification/home-notification.component.js b/ui/components/app/home-notification/home-notification.component.js index 1344c74ea..cb56dc0fa 100644 --- a/ui/components/app/home-notification/home-notification.component.js +++ b/ui/components/app/home-notification/home-notification.component.js @@ -4,6 +4,8 @@ import PropTypes from 'prop-types'; import Button from '../../ui/button'; import Checkbox from '../../ui/check-box'; import Tooltip from '../../ui/tooltip'; +import { Icon, IconName } from '../../component-library'; +import { IconColor } from '../../../helpers/constants/design-system'; const HomeNotification = ({ acceptText, @@ -39,7 +41,7 @@ const HomeNotification = ({ title={infoText} wrapperClassName="home-notification__tooltip-wrapper" > - + ) : null}
diff --git a/ui/components/app/home-notification/index.scss b/ui/components/app/home-notification/index.scss index 64672e85d..ad3b3ddfd 100644 --- a/ui/components/app/home-notification/index.scss +++ b/ui/components/app/home-notification/index.scss @@ -36,10 +36,6 @@ cursor: pointer; } - .fa-info-circle { - color: var(--color-icon-default); - } - &__checkbox-wrapper { display: flex; flex-direction: row; diff --git a/ui/components/app/nfts-detection-notice/nfts-detection-notice.js b/ui/components/app/nfts-detection-notice/nfts-detection-notice.js index ab7b6365a..84d90c5d7 100644 --- a/ui/components/app/nfts-detection-notice/nfts-detection-notice.js +++ b/ui/components/app/nfts-detection-notice/nfts-detection-notice.js @@ -9,10 +9,12 @@ import { FONT_WEIGHT, DISPLAY, TextColor, + IconColor, } from '../../../helpers/constants/design-system'; import { useI18nContext } from '../../../hooks/useI18nContext'; import Button from '../../ui/button'; import { EXPERIMENTAL_ROUTE } from '../../../helpers/constants/routes'; +import { Icon, IconName } from '../../component-library'; export default function NftsDetectionNotice() { const t = useI18nContext(); @@ -23,12 +25,10 @@ export default function NftsDetectionNotice() { - diff --git a/ui/components/app/tab-bar/tab-bar.stories.js b/ui/components/app/tab-bar/tab-bar.stories.js index 2861437a3..c4f18c48a 100644 --- a/ui/components/app/tab-bar/tab-bar.stories.js +++ b/ui/components/app/tab-bar/tab-bar.stories.js @@ -54,7 +54,7 @@ export default { key: 'experimental', }, { - icon: , + icon: , content: 'About', key: 'about', }, diff --git a/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js b/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js new file mode 100644 index 000000000..5eb2e730d --- /dev/null +++ b/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js @@ -0,0 +1,20 @@ +import React from 'react'; +import Accreditation from './accreditation.component'; + +export default { + title: 'Components/App/Accrediation', // title should follow the folder structure location of the component. Don't use spaces. + + argTypes: { + fetchVia: { + control: 'string', + }, + address: { control: 'string' }, + }, + args: { + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + }, +}; + +export const DefaultStory = (args) => ; + +DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js b/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js index e79f227b9..cf0f40073 100644 --- a/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js +++ b/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js @@ -12,6 +12,7 @@ import { TypographyVariant } from '../../../../../../helpers/constants/design-sy import Button from '../../../../../ui/button'; import Typography from '../../../../../ui/typography'; +import { Icon, IconName } from '../../../../../component-library'; const Accreditation = ({ fetchVia, address }) => { const t = useContext(I18nContext); @@ -55,7 +56,7 @@ const Accreditation = ({ fetchVia, address }) => { return (
- +
diff --git a/ui/components/app/transaction-detail-item/transaction-detail-item.stories.js b/ui/components/app/transaction-detail-item/transaction-detail-item.stories.js index cfd8a39d1..dcb8f1c07 100644 --- a/ui/components/app/transaction-detail-item/transaction-detail-item.stories.js +++ b/ui/components/app/transaction-detail-item/transaction-detail-item.stories.js @@ -3,6 +3,7 @@ import InfoTooltip from '../../ui/info-tooltip/info-tooltip'; import { TextColor } from '../../../helpers/constants/design-system'; +import { Icon, IconName } from '../../component-library'; import README from './README.mdx'; import TransactionDetailItem from '.'; @@ -45,7 +46,7 @@ DefaultStory.args = { <> Estimated gas fee - + ), diff --git a/ui/components/app/transaction-detail/transaction-detail.stories.js b/ui/components/app/transaction-detail/transaction-detail.stories.js index 0a44d22fb..4e34ff627 100644 --- a/ui/components/app/transaction-detail/transaction-detail.stories.js +++ b/ui/components/app/transaction-detail/transaction-detail.stories.js @@ -2,6 +2,7 @@ import React from 'react'; import InfoTooltip from '../../ui/info-tooltip/info-tooltip'; import TransactionDetailItem from '../transaction-detail-item/transaction-detail-item.component'; import GasTiming from '../gas-timing/gas-timing.component'; +import { Icon, IconName } from '../../component-library'; import README from './README.mdx'; import TransactionDetail from '.'; @@ -27,7 +28,7 @@ const rows = [ <> Estimated gas fee - + } diff --git a/ui/components/ui/account-list/account-list.js b/ui/components/ui/account-list/account-list.js index 2cfdf70d2..1bcd5f99b 100644 --- a/ui/components/ui/account-list/account-list.js +++ b/ui/components/ui/account-list/account-list.js @@ -8,6 +8,8 @@ import Identicon from '../identicon'; import UserPreferencedCurrencyDisplay from '../../app/user-preferenced-currency-display'; import { PRIMARY } from '../../../helpers/constants/common'; import Tooltip from '../tooltip'; +import { Icon, IconName } from '../../component-library'; +import { IconColor } from '../../../helpers/constants/design-system'; const AccountList = ({ selectNewAccountViaModal, @@ -61,7 +63,12 @@ const AccountList = ({
} > - +
) : null} @@ -114,7 +121,12 @@ const AccountList = ({ addressLastConnectedMap[address] }`} > - + ) : null} diff --git a/ui/components/ui/account-list/index.scss b/ui/components/ui/account-list/index.scss index c00b08e0e..c5e97f183 100644 --- a/ui/components/ui/account-list/index.scss +++ b/ui/components/ui/account-list/index.scss @@ -113,14 +113,11 @@ } } - .fa-info-circle { - color: var(--color-icon-muted); + .info-circle { cursor: pointer; - margin-inline-start: 8px; - font-size: 0.9rem; } - .fa-info-circle:hover { + .info-circle:hover { color: var(--color-icon-default); } diff --git a/ui/components/ui/definition-list/definition-list.js b/ui/components/ui/definition-list/definition-list.js index bfe3b4b1a..60aa5cf5c 100644 --- a/ui/components/ui/definition-list/definition-list.js +++ b/ui/components/ui/definition-list/definition-list.js @@ -8,8 +8,10 @@ import { FONT_WEIGHT, OVERFLOW_WRAP, TextColor, + IconColor, } from '../../../helpers/constants/design-system'; import Tooltip from '../tooltip'; +import { Icon, IconName, IconSize } from '../../component-library'; const MARGIN_MAP = { [Size.XS]: 0, @@ -48,7 +50,12 @@ export default function DefinitionList({ position="top" containerClassName="definition-list__tooltip-wrapper" > - + )} diff --git a/ui/components/ui/definition-list/definition-list.scss b/ui/components/ui/definition-list/definition-list.scss index 1517d46b7..2a99ab126 100644 --- a/ui/components/ui/definition-list/definition-list.scss +++ b/ui/components/ui/definition-list/definition-list.scss @@ -5,12 +5,6 @@ display: flex; align-items: center; - & i { - color: var(--color-icon-default); - margin-left: 6px; - font-size: $font-size-h8; - } - & #{$self}__tooltip-wrapper { display: flex !important; align-items: center; diff --git a/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js b/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js index 310d19bc3..1c8aaa180 100644 --- a/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js +++ b/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js @@ -12,7 +12,7 @@ import Box from '../box/box'; import ActionableMessage from '../actionable-message/actionable-message'; import { getCurrentChainId } from '../../../selectors'; import { getCompletedOnboarding } from '../../../ducks/metamask/metamask'; -import { Text } from '../../component-library'; +import { Text, Icon, IconName, IconSize } from '../../component-library'; export default function DeprecatedTestNetworks() { const currentChainID = useSelector(getCurrentChainId); @@ -45,7 +45,7 @@ export default function DeprecatedTestNetworks() { className="deprecated-test-networks__content" > - + ( Hover over the info icon to see the tooltip - + ); @@ -74,10 +72,7 @@ export const HTML = (args) => ( This tooltips content is html - + ); diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js index 2fbc8e713..f7297238f 100644 --- a/ui/helpers/constants/settings.js +++ b/ui/helpers/constants/settings.js @@ -1,3 +1,4 @@ +import { IconName } from '../../components/component-library'; import { ICON_NAMES } from '../../components/component-library/icon/deprecated'; import { ALERTS_ROUTE, @@ -259,28 +260,28 @@ export const SETTINGS_CONSTANTS = [ sectionMessage: (t) => t('metamaskVersion'), descriptionMessage: (t) => t('builtAroundTheWorld'), route: `${ABOUT_US_ROUTE}#version`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { tabMessage: (t) => t('about'), sectionMessage: (t) => t('links'), descriptionMessage: (t) => t('links'), route: `${ABOUT_US_ROUTE}#links`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { tabMessage: (t) => t('about'), sectionMessage: (t) => t('privacyMsg'), descriptionMessage: (t) => t('privacyMsg'), route: `${ABOUT_US_ROUTE}#privacy-policy`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { tabMessage: (t) => t('about'), sectionMessage: (t) => t('terms'), descriptionMessage: (t) => t('terms'), route: `${ABOUT_US_ROUTE}#terms`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { @@ -288,7 +289,7 @@ export const SETTINGS_CONSTANTS = [ sectionMessage: (t) => t('attributions'), descriptionMessage: (t) => t('attributions'), route: `${ABOUT_US_ROUTE}#attributions`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { @@ -296,7 +297,7 @@ export const SETTINGS_CONSTANTS = [ sectionMessage: (t) => t('supportCenter'), descriptionMessage: (t) => t('supportCenter'), route: `${ABOUT_US_ROUTE}#supportcenter`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { @@ -304,7 +305,7 @@ export const SETTINGS_CONSTANTS = [ sectionMessage: (t) => t('visitWebSite'), descriptionMessage: (t) => t('visitWebSite'), route: `${ABOUT_US_ROUTE}#visitwebsite`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { @@ -312,14 +313,14 @@ export const SETTINGS_CONSTANTS = [ sectionMessage: (t) => t('contactUs'), descriptionMessage: (t) => t('contactUs'), route: `${ABOUT_US_ROUTE}#contactus`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { tabMessage: (t) => t('about'), sectionMessage: (t) => t('betaTerms'), descriptionMessage: (t) => t('betaTerms'), route: `${ABOUT_US_ROUTE}#beta-terms`, - icon: 'fa fa-info-circle', + iconName: IconName.Info, }, { tabMessage: (t) => t('experimental'), diff --git a/ui/pages/send/send-content/send-gas-row/__snapshots__/send-gas-row.test.js.snap b/ui/pages/send/send-content/send-gas-row/__snapshots__/send-gas-row.test.js.snap index cee7edf62..f97cefbc4 100644 --- a/ui/pages/send/send-content/send-gas-row/__snapshots__/send-gas-row.test.js.snap +++ b/ui/pages/send/send-content/send-gas-row/__snapshots__/send-gas-row.test.js.snap @@ -30,8 +30,9 @@ exports[`SendGasRow Component render should match snapshot 1`] = ` style="display: inline;" tabindex="0" > - @@ -82,8 +83,9 @@ exports[`SendGasRow Component render should match snapshot 1`] = ` style="display: inline;" tabindex="0" > - diff --git a/ui/pages/settings/alerts-tab/alerts-tab.js b/ui/pages/settings/alerts-tab/alerts-tab.js index 83dd76e14..7523c68f6 100644 --- a/ui/pages/settings/alerts-tab/alerts-tab.js +++ b/ui/pages/settings/alerts-tab/alerts-tab.js @@ -9,6 +9,7 @@ import { setAlertEnabledness } from '../../../store/actions'; import { getAlertEnabledness } from '../../../ducks/metamask/metamask'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { handleSettingsRefs } from '../../../helpers/utils/settings-search'; +import { Icon, IconName } from '../../../components/component-library'; const AlertSettingsEntry = ({ alertId, description, title }) => { const t = useI18nContext(); @@ -30,7 +31,10 @@ const AlertSettingsEntry = ({ alertId, description, title }) => { title={description} wrapperClassName="alerts-tab__description" > - + { + return ; +}; + +DefaultAlertsTab.storyName = 'Default'; diff --git a/ui/pages/settings/settings.component.js b/ui/pages/settings/settings.component.js index deab2d573..788110616 100644 --- a/ui/pages/settings/settings.component.js +++ b/ui/pages/settings/settings.component.js @@ -303,7 +303,7 @@ class SettingsPage extends PureComponent { }, { content: t('about'), - icon: , + icon: , key: ABOUT_US_ROUTE, }, ]; diff --git a/ui/pages/swaps/view-quote/__snapshots__/view-quote-price-difference.test.js.snap b/ui/pages/swaps/view-quote/__snapshots__/view-quote-price-difference.test.js.snap index 41cf8a7fa..ce2ad6d17 100644 --- a/ui/pages/swaps/view-quote/__snapshots__/view-quote-price-difference.test.js.snap +++ b/ui/pages/swaps/view-quote/__snapshots__/view-quote-price-difference.test.js.snap @@ -35,8 +35,9 @@ exports[`View Price Quote Difference displays a fiat error when calculationError style="display: inline;" tabindex="0" > - @@ -92,8 +93,9 @@ exports[`View Price Quote Difference displays an error when in high bucket 1`] = style="display: inline;" tabindex="0" > - @@ -149,8 +151,9 @@ exports[`View Price Quote Difference displays an error when in medium bucket 1`] style="display: inline;" tabindex="0" > - @@ -206,8 +209,9 @@ exports[`View Price Quote Difference should match snapshot 1`] = ` style="display: inline;" tabindex="0" > - diff --git a/ui/pages/swaps/view-quote/view-quote-price-difference.js b/ui/pages/swaps/view-quote/view-quote-price-difference.js index 602db1393..260724349 100644 --- a/ui/pages/swaps/view-quote/view-quote-price-difference.js +++ b/ui/pages/swaps/view-quote/view-quote-price-difference.js @@ -12,6 +12,7 @@ import { DISPLAY, } from '../../../helpers/constants/design-system'; import { GasRecommendations } from '../../../../shared/constants/gas'; +import { Icon, IconName } from '../../../components/component-library'; export default function ViewQuotePriceDifference(props) { const { @@ -74,7 +75,7 @@ export default function ViewQuotePriceDifference(props) { {priceDifferenceTitle} - + {priceDifferenceMessage}