@transferwise/components 46.0.1 → 46.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -361,7 +361,7 @@ class MoneyInput extends Component {
|
|
|
361
361
|
renderValue={(currency, withinTrigger) => {
|
|
362
362
|
return (
|
|
363
363
|
<SelectInputOptionContent
|
|
364
|
-
title={currency.label}
|
|
364
|
+
title={withinTrigger ? currency.currency.toUpperCase() : currency.label}
|
|
365
365
|
note={withinTrigger ? undefined : currency.note}
|
|
366
366
|
icon={<Flag code={currency.currency} intrinsicSize={24} />}
|
|
367
367
|
/>
|
|
@@ -3,8 +3,6 @@ import { within, userEvent } from '@storybook/testing-library';
|
|
|
3
3
|
import { Lock } from '@transferwise/icons';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
-
import Drawer from '../drawer';
|
|
7
|
-
|
|
8
6
|
import MoneyInput from '.';
|
|
9
7
|
|
|
10
8
|
export default {
|
|
@@ -82,6 +80,17 @@ const exampleCurrency = {
|
|
|
82
80
|
},
|
|
83
81
|
} as const;
|
|
84
82
|
|
|
83
|
+
const exampleBalanceCurrency = {
|
|
84
|
+
eur: {
|
|
85
|
+
...exampleCurrency.eur,
|
|
86
|
+
label: '123.45 EUR',
|
|
87
|
+
},
|
|
88
|
+
gbp: {
|
|
89
|
+
...exampleCurrency.gbp,
|
|
90
|
+
label: '12.34 GBP',
|
|
91
|
+
},
|
|
92
|
+
} as const;
|
|
93
|
+
|
|
85
94
|
export const SingleCurrency: Story = {
|
|
86
95
|
args: {
|
|
87
96
|
currencies: [],
|
|
@@ -117,6 +126,20 @@ export const MultipleCurrencies: Story = {
|
|
|
117
126
|
},
|
|
118
127
|
};
|
|
119
128
|
|
|
129
|
+
export const BalanceCurrencies: Story = {
|
|
130
|
+
args: {
|
|
131
|
+
currencies: [
|
|
132
|
+
{
|
|
133
|
+
header: 'Balance currencies',
|
|
134
|
+
},
|
|
135
|
+
exampleBalanceCurrency.eur,
|
|
136
|
+
exampleBalanceCurrency.gbp,
|
|
137
|
+
],
|
|
138
|
+
selectedCurrency: exampleBalanceCurrency.eur,
|
|
139
|
+
searchPlaceholder: 'Type a currency / country',
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
120
143
|
export const OpenedInput: Story = {
|
|
121
144
|
...MultipleCurrencies,
|
|
122
145
|
play: ({ canvasElement }) => {
|