From e6376e605d492643a4650da2d8e9d5791711af16 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Mon, 17 Jul 2023 16:20:18 -0500 Subject: [PATCH] Use TextVariant: Inherit to keep correct font-size --- .../confirm-gas-display.test.js.snap | 10 ++++---- .../confirm-legacy-gas-display.test.js.snap | 10 ++++---- .../confirm-detail-row.component.test.js.snap | 6 +++-- .../__snapshots__/currency-input.test.js.snap | 12 +++++----- ...transaction-gas-fee.component.test.js.snap | 8 +++---- .../multi-layer-fee-message.test.js.snap | 2 +- ...-preferenced-currency-display.test.js.snap | 4 ++-- .../account-list-item.test.js.snap | 8 +++---- .../currency-display.component.test.js.snap | 6 ++--- .../currency-display.component.js | 4 ++++ .../confirm-send-ether.test.js.snap | 23 ++++++++++--------- .../confirm-transaction-base.test.js.snap | 11 +++++---- .../send-content.component.test.js.snap | 12 +++++----- 13 files changed, 62 insertions(+), 54 deletions(-) diff --git a/ui/components/app/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap b/ui/components/app/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap index 646a08524c57..c267149f2016 100644 --- a/ui/components/app/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap +++ b/ui/components/app/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap @@ -68,7 +68,7 @@ exports[`ConfirmGasDisplay should match snapshot 1`] = ` title="0" > 0 @@ -86,12 +86,12 @@ exports[`ConfirmGasDisplay should match snapshot 1`] = ` title="0 ETH" > 0 ETH @@ -131,12 +131,12 @@ exports[`ConfirmGasDisplay should match snapshot 1`] = ` title="0 ETH" > 0 ETH diff --git a/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap b/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap index b46aa1194da1..78a5375965e0 100644 --- a/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap +++ b/ui/components/app/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap @@ -50,7 +50,7 @@ exports[`ConfirmLegacyGasDisplay should match snapshot 1`] = ` title="0.000021" > 0.000021 @@ -66,12 +66,12 @@ exports[`ConfirmLegacyGasDisplay should match snapshot 1`] = ` title="0.000021 ETH" > 0.000021 ETH @@ -96,12 +96,12 @@ exports[`ConfirmLegacyGasDisplay should match snapshot 1`] = ` title="0.000021 ETH" > 0.000021 ETH diff --git a/ui/components/app/confirm-page-container/confirm-detail-row/__snapshots__/confirm-detail-row.component.test.js.snap b/ui/components/app/confirm-page-container/confirm-detail-row/__snapshots__/confirm-detail-row.component.test.js.snap index e8c331c5b842..4b8237923ce1 100644 --- a/ui/components/app/confirm-page-container/confirm-detail-row/__snapshots__/confirm-detail-row.component.test.js.snap +++ b/ui/components/app/confirm-page-container/confirm-detail-row/__snapshots__/confirm-detail-row.component.test.js.snap @@ -17,6 +17,7 @@ exports[`Confirm Detail Row Component should match snapshot 1`] = ` >
0 @@ -35,6 +36,7 @@ exports[`Confirm Detail Row Component should match snapshot 1`] = ` >
0 diff --git a/ui/components/app/currency-input/__snapshots__/currency-input.test.js.snap b/ui/components/app/currency-input/__snapshots__/currency-input.test.js.snap index d61dda6683e5..559171d0c9d5 100644 --- a/ui/components/app/currency-input/__snapshots__/currency-input.test.js.snap +++ b/ui/components/app/currency-input/__snapshots__/currency-input.test.js.snap @@ -31,12 +31,12 @@ exports[`CurrencyInput Component rendering should render properly with a fiat va title="0.00432788 ETH" > 0.00432788 ETH @@ -129,12 +129,12 @@ exports[`CurrencyInput Component rendering should render properly with an ETH va title="$231.06 USD" > $231.06 USD @@ -183,12 +183,12 @@ exports[`CurrencyInput Component rendering should render properly without a suff title="$0.00 USD" > $0.00 USD diff --git a/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/__snapshots__/cancel-transaction-gas-fee.component.test.js.snap b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/__snapshots__/cancel-transaction-gas-fee.component.test.js.snap index c52d526f8050..c98f7b37a587 100644 --- a/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/__snapshots__/cancel-transaction-gas-fee.component.test.js.snap +++ b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/__snapshots__/cancel-transaction-gas-fee.component.test.js.snap @@ -10,12 +10,12 @@ exports[`CancelTransactionGasFee Component should render 1`] = ` title="0 ETH" > 0 ETH @@ -25,12 +25,12 @@ exports[`CancelTransactionGasFee Component should render 1`] = ` title="0 ETH" > 0 ETH diff --git a/ui/components/app/multilayer-fee-message/__snapshots__/multi-layer-fee-message.test.js.snap b/ui/components/app/multilayer-fee-message/__snapshots__/multi-layer-fee-message.test.js.snap index bb8cbf76456f..cce8f87215bd 100644 --- a/ui/components/app/multilayer-fee-message/__snapshots__/multi-layer-fee-message.test.js.snap +++ b/ui/components/app/multilayer-fee-message/__snapshots__/multi-layer-fee-message.test.js.snap @@ -139,7 +139,7 @@ exports[`Multi layer fee message when balance and token price checker is enabled title="$0.56" > $0.56 diff --git a/ui/components/app/user-preferenced-currency-display/__snapshots__/user-preferenced-currency-display.test.js.snap b/ui/components/app/user-preferenced-currency-display/__snapshots__/user-preferenced-currency-display.test.js.snap index 3608b8f5f010..8694dbbe911d 100644 --- a/ui/components/app/user-preferenced-currency-display/__snapshots__/user-preferenced-currency-display.test.js.snap +++ b/ui/components/app/user-preferenced-currency-display/__snapshots__/user-preferenced-currency-display.test.js.snap @@ -7,12 +7,12 @@ exports[`UserPreferencedCurrencyDisplay Component rendering should match snapsho title="0 ETH" > 0 ETH diff --git a/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap b/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap index 5d29a862472a..dc798fd6e9be 100644 --- a/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap +++ b/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap @@ -78,12 +78,12 @@ exports[`AccountListItem renders AccountListItem component and shows account nam title="0.006 ETH" > 0.006 ETH @@ -111,12 +111,12 @@ exports[`AccountListItem renders AccountListItem component and shows account nam title="0.006 ETH" > 0.006 ETH diff --git a/ui/components/ui/currency-display/__snapshots__/currency-display.component.test.js.snap b/ui/components/ui/currency-display/__snapshots__/currency-display.component.test.js.snap index cd351bf00473..b47181d4f0e2 100644 --- a/ui/components/ui/currency-display/__snapshots__/currency-display.component.test.js.snap +++ b/ui/components/ui/currency-display/__snapshots__/currency-display.component.test.js.snap @@ -7,7 +7,7 @@ exports[`CurrencyDisplay Component should match default snapshot 1`] = ` title="null" > @@ -20,7 +20,7 @@ exports[`CurrencyDisplay Component should render text with a className 1`] = ` title="$123.45" > $123.45 @@ -35,7 +35,7 @@ exports[`CurrencyDisplay Component should render text with a prefix 1`] = ` title="-$123.45" > - $123.45 diff --git a/ui/components/ui/currency-display/currency-display.component.js b/ui/components/ui/currency-display/currency-display.component.js index e37bb2d9cf54..0a68d7c2a610 100644 --- a/ui/components/ui/currency-display/currency-display.component.js +++ b/ui/components/ui/currency-display/currency-display.component.js @@ -8,6 +8,7 @@ import { AlignItems, Display, FlexWrap, + TextVariant, } from '../../../helpers/constants/design-system'; export default function CurrencyDisplay({ @@ -54,6 +55,7 @@ export default function CurrencyDisplay({ {prefixComponent} @@ -63,6 +65,7 @@ export default function CurrencyDisplay({ as="span" className="currency-display-component__text" ellipsis + variant={TextVariant.inherit} {...textProps} > {parts.prefix} @@ -73,6 +76,7 @@ export default function CurrencyDisplay({ as="span" className="currency-display-component__suffix" marginInlineStart={1} + variant={TextVariant.inherit} {...suffixProps} > {parts.suffix} diff --git a/ui/pages/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap b/ui/pages/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap index 604fb295f426..dae55134a048 100644 --- a/ui/pages/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap +++ b/ui/pages/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap @@ -292,6 +292,7 @@ exports[`ConfirmSendEther should render correct information for for confirm send >
0 @@ -452,7 +453,7 @@ exports[`ConfirmSendEther should render correct information for for confirm send title="0.00021" > 0.00021 @@ -470,12 +471,12 @@ exports[`ConfirmSendEther should render correct information for for confirm send title="0.00021 ETH" > 0.00021 ETH @@ -515,12 +516,12 @@ exports[`ConfirmSendEther should render correct information for for confirm send title="0.00021 ETH" > 0.00021 ETH @@ -555,7 +556,7 @@ exports[`ConfirmSendEther should render correct information for for confirm send title="0.00021" > 0.00021 @@ -573,12 +574,12 @@ exports[`ConfirmSendEther should render correct information for for confirm send title="0.00021 ETH" > 0.00021 ETH @@ -610,12 +611,12 @@ exports[`ConfirmSendEther should render correct information for for confirm send title="0.00021 ETH" > 0.00021 ETH diff --git a/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap b/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap index 403e03d90eb3..ba6041638b9f 100644 --- a/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap +++ b/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap @@ -262,6 +262,7 @@ exports[`Confirm Transaction Base should match snapshot 1`] = ` >
0.0001 @@ -382,7 +383,7 @@ exports[`Confirm Transaction Base should match snapshot 1`] = ` title="0.000021" > 0.000021 @@ -407,7 +408,7 @@ exports[`Confirm Transaction Base should match snapshot 1`] = ` title="0.000021" > 0.000021 @@ -441,7 +442,7 @@ exports[`Confirm Transaction Base should match snapshot 1`] = ` title="0.000121" > 0.000121 @@ -473,7 +474,7 @@ exports[`Confirm Transaction Base should match snapshot 1`] = ` title="0.000121" > 0.000121 diff --git a/ui/pages/send/send-content/__snapshots__/send-content.component.test.js.snap b/ui/pages/send/send-content/__snapshots__/send-content.component.test.js.snap index d7ab0d82af16..7bb9b3cb6def 100644 --- a/ui/pages/send/send-content/__snapshots__/send-content.component.test.js.snap +++ b/ui/pages/send/send-content/__snapshots__/send-content.component.test.js.snap @@ -55,12 +55,12 @@ exports[`SendContent Component render should match snapshot 1`] = ` title="0 ETH" > 0 ETH @@ -242,12 +242,12 @@ exports[`SendContent Component render should match snapshot 1`] = ` title="0.0000315 ETH" > 0.0000315 ETH @@ -287,12 +287,12 @@ exports[`SendContent Component render should match snapshot 1`] = ` title="0.0000315 ETH" > 0.0000315 ETH