mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
bab1670432
* Restructure CurrencyDisplay to use Design System * Add storybook, remove CSS * Update ui/components/ui/currency-display/currency-display.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/ui/currency-display/currency-display.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/ui/currency-display/currency-display.stories.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/ui/currency-display/currency-display.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/ui/currency-display/currency-display.stories.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/ui/currency-display/currency-display.stories.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Remove deprecated imports, import EtherDenomination * Update jest * Use TextVariant: Inherit to keep correct font-size * Snapshots * Switch from boxProps to props --------- Co-authored-by: George Marshall <george.marshall@consensys.net>
208 lines
4.9 KiB
Plaintext
208 lines
4.9 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`CurrencyInput Component rendering should render properly with a fiat value 1`] = `
|
|
<div>
|
|
<div
|
|
class="unit-input"
|
|
>
|
|
<div
|
|
class="unit-input__inputs"
|
|
>
|
|
<div
|
|
class="unit-input__input-container"
|
|
>
|
|
<input
|
|
class="unit-input__input"
|
|
data-testid="currency-input"
|
|
dir="ltr"
|
|
placeholder="0"
|
|
style="width: 1.5ch;"
|
|
type="number"
|
|
value="1"
|
|
/>
|
|
<div
|
|
class="unit-input__suffix"
|
|
>
|
|
USD
|
|
</div>
|
|
</div>
|
|
<div
|
|
class="mm-box currency-display-component currency-input__conversion-component mm-box--display-flex mm-box--flex-wrap-wrap mm-box--align-items-center"
|
|
title="0.00432788 ETH"
|
|
>
|
|
<span
|
|
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
|
|
>
|
|
0.00432788
|
|
</span>
|
|
<span
|
|
class="mm-box mm-text currency-display-component__suffix mm-text--inherit mm-box--margin-inline-start-1 mm-box--color-text-default"
|
|
>
|
|
ETH
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<button
|
|
class="currency-input__swap-component"
|
|
data-testid="currency-swap"
|
|
>
|
|
<i
|
|
class="fa fa-retweet fa-lg"
|
|
/>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`CurrencyInput Component rendering should render properly with a native value when hideSecondary is true 1`] = `
|
|
<div>
|
|
<div
|
|
class="unit-input"
|
|
>
|
|
<div
|
|
class="unit-input__inputs"
|
|
>
|
|
<div
|
|
class="unit-input__input-container"
|
|
>
|
|
<input
|
|
class="unit-input__input"
|
|
data-testid="currency-input"
|
|
dir="ltr"
|
|
placeholder="0"
|
|
style="width: 10ch;"
|
|
type="number"
|
|
value="0.00432788"
|
|
/>
|
|
<div
|
|
class="unit-input__suffix"
|
|
>
|
|
ETH
|
|
</div>
|
|
</div>
|
|
<div
|
|
class="currency-input__conversion-component"
|
|
>
|
|
No conversion rate available
|
|
</div>
|
|
</div>
|
|
<button
|
|
class="currency-input__swap-component"
|
|
data-testid="currency-swap"
|
|
>
|
|
<i
|
|
class="fa fa-retweet fa-lg"
|
|
/>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`CurrencyInput Component rendering should render properly with an ETH value 1`] = `
|
|
<div>
|
|
<div
|
|
class="unit-input"
|
|
>
|
|
<div
|
|
class="unit-input__inputs"
|
|
>
|
|
<div
|
|
class="unit-input__input-container"
|
|
>
|
|
<input
|
|
class="unit-input__input"
|
|
data-testid="currency-input"
|
|
dir="ltr"
|
|
placeholder="0"
|
|
style="width: 1.5ch;"
|
|
type="number"
|
|
value="1"
|
|
/>
|
|
<div
|
|
class="unit-input__suffix"
|
|
>
|
|
ETH
|
|
</div>
|
|
</div>
|
|
<div
|
|
class="mm-box currency-display-component currency-input__conversion-component mm-box--display-flex mm-box--flex-wrap-wrap mm-box--align-items-center"
|
|
title="$231.06 USD"
|
|
>
|
|
<span
|
|
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
|
|
>
|
|
$231.06
|
|
</span>
|
|
<span
|
|
class="mm-box mm-text currency-display-component__suffix mm-text--inherit mm-box--margin-inline-start-1 mm-box--color-text-default"
|
|
>
|
|
USD
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<button
|
|
class="currency-input__swap-component"
|
|
data-testid="currency-swap"
|
|
>
|
|
<i
|
|
class="fa fa-retweet fa-lg"
|
|
/>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`CurrencyInput Component rendering should render properly without a suffix 1`] = `
|
|
<div>
|
|
<div
|
|
class="unit-input"
|
|
>
|
|
<div
|
|
class="unit-input__inputs"
|
|
>
|
|
<div
|
|
class="unit-input__input-container"
|
|
>
|
|
<input
|
|
class="unit-input__input"
|
|
data-testid="currency-input"
|
|
dir="ltr"
|
|
placeholder="0"
|
|
style="width: 1.5ch;"
|
|
type="number"
|
|
value="0"
|
|
/>
|
|
<div
|
|
class="unit-input__suffix"
|
|
>
|
|
ETH
|
|
</div>
|
|
</div>
|
|
<div
|
|
class="mm-box currency-display-component currency-input__conversion-component mm-box--display-flex mm-box--flex-wrap-wrap mm-box--align-items-center"
|
|
title="$0.00 USD"
|
|
>
|
|
<span
|
|
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
|
|
>
|
|
$0.00
|
|
</span>
|
|
<span
|
|
class="mm-box mm-text currency-display-component__suffix mm-text--inherit mm-box--margin-inline-start-1 mm-box--color-text-default"
|
|
>
|
|
USD
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<button
|
|
class="currency-input__swap-component"
|
|
data-testid="currency-swap"
|
|
>
|
|
<i
|
|
class="fa fa-retweet fa-lg"
|
|
/>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
`;
|