@transferwise/components 0.0.0-experimental-faee41b → 0.0.0-experimental-96d193a
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/build/alert/Alert.js +3 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +3 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +1 -3
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +1 -3
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/drawer/Drawer.js +0 -2
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +0 -2
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/field/Field.js +2 -0
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +2 -0
- package/build/field/Field.mjs.map +1 -1
- package/build/i18n/en.json +5 -0
- package/build/i18n/en.json.js +5 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +5 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +3 -1
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +3 -1
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/modal/Modal.js +0 -3
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +0 -3
- package/build/modal/Modal.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +50 -16
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.js +24 -0
- package/build/statusIcon/StatusIcon.messages.js.map +1 -0
- package/build/statusIcon/StatusIcon.messages.mjs +22 -0
- package/build/statusIcon/StatusIcon.messages.mjs.map +1 -0
- package/build/statusIcon/StatusIcon.mjs +48 -14
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/types/alert/Alert.d.ts +6 -1
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts +1 -2
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/drawer/Drawer.d.ts +1 -2
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/field/Field.d.ts +6 -1
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/inlineAlert/InlineAlert.d.ts +2 -1
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts +1 -2
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +6 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.messages.d.ts +29 -0
- package/build/types/statusIcon/StatusIcon.messages.d.ts.map +1 -0
- package/build/types/upload/Upload.d.ts +5 -0
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +1 -0
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +0 -9
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts +1 -16
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItemLink.d.ts.map +1 -1
- package/build/upload/Upload.js +4 -2
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +4 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +4 -2
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +4 -2
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +66 -71
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +67 -72
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +4 -13
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +4 -13
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js +0 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs +0 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
- package/package.json +3 -3
- package/src/alert/Alert.spec.tsx +10 -0
- package/src/alert/Alert.tsx +7 -1
- package/src/dimmer/Dimmer.spec.js +0 -8
- package/src/dimmer/Dimmer.tsx +0 -4
- package/src/drawer/Drawer.spec.js +6 -25
- package/src/drawer/Drawer.tsx +1 -3
- package/src/field/Field.spec.tsx +19 -0
- package/src/field/Field.story.tsx +20 -4
- package/src/field/Field.tsx +7 -1
- package/src/i18n/en.json +5 -0
- package/src/inlineAlert/InlineAlert.spec.tsx +12 -1
- package/src/inlineAlert/InlineAlert.tsx +5 -1
- package/src/modal/Modal.spec.js +1 -19
- package/src/modal/Modal.tsx +0 -4
- package/src/statusIcon/StatusIcon.docs.mdx +22 -0
- package/src/statusIcon/StatusIcon.messages.ts +34 -0
- package/src/statusIcon/StatusIcon.spec.tsx +31 -4
- package/src/statusIcon/StatusIcon.story.tsx +2 -5
- package/src/statusIcon/StatusIcon.tsx +59 -14
- package/src/upload/Upload.spec.js +19 -0
- package/src/upload/Upload.tsx +7 -0
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.js +13 -0
- package/src/upload/steps/uploadImageStep/uploadImageStep.tsx +14 -3
- package/src/uploadInput/UploadInput.spec.tsx +9 -121
- package/src/uploadInput/UploadInput.tests.story.tsx +140 -209
- package/src/uploadInput/UploadInput.tsx +77 -110
- package/src/uploadInput/uploadItem/UploadItem.spec.tsx +0 -1
- package/src/uploadInput/uploadItem/UploadItem.tsx +6 -30
- package/src/uploadInput/uploadItem/UploadItemLink.tsx +1 -9
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import {
|
|
2
|
+
import { StoryFn, Meta } from '@storybook/react';
|
|
3
3
|
|
|
4
4
|
import { Status } from '../common';
|
|
5
|
+
|
|
5
6
|
import UploadInput, { UploadInputProps } from './UploadInput';
|
|
6
7
|
import { UploadedFile, UploadResponse } from './types';
|
|
7
|
-
import { userEvent, within } from '@storybook/test';
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof UploadInput> = {
|
|
10
10
|
title: 'Forms/UploadInput/Tests',
|
|
11
11
|
component: UploadInput,
|
|
12
12
|
};
|
|
13
|
-
export default meta;
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryFn<UploadInputProps>;
|
|
16
16
|
|
|
17
|
-
const files
|
|
17
|
+
const files = [
|
|
18
18
|
{
|
|
19
|
-
id:
|
|
19
|
+
id: 1,
|
|
20
20
|
filename: 'purchase-receipt-0.pdf',
|
|
21
21
|
url: 'https://wise.com/public-resources/assets/logos/wise/brand_logo_inverse.svg',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
id:
|
|
24
|
+
id: 2,
|
|
25
25
|
filename: 'purchase-receipt-1.pdf',
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
id:
|
|
28
|
+
id: 3,
|
|
29
29
|
filename: 'purchase-receipt-2.pdf',
|
|
30
30
|
url: 'https://wise.com/public-resources/assets/logos/wise/brand_logo_inverse.svg',
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
id:
|
|
33
|
+
id: 4,
|
|
34
34
|
filename: 'receipt failed.png',
|
|
35
35
|
status: Status.FAILED,
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
id:
|
|
38
|
+
id: 5,
|
|
39
39
|
filename: 'receipt failed With error string.png',
|
|
40
40
|
status: Status.FAILED,
|
|
41
41
|
error: 'Something went wrong',
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
id:
|
|
44
|
+
id: 6,
|
|
45
45
|
filename: 'receipt failed With error object.png',
|
|
46
46
|
status: Status.FAILED,
|
|
47
47
|
error: { message: 'Something went wrong' },
|
|
48
48
|
},
|
|
49
|
-
];
|
|
49
|
+
] satisfies UploadedFile[];
|
|
50
50
|
|
|
51
51
|
const createDelayedPromise = async ({
|
|
52
52
|
successful = true,
|
|
@@ -65,232 +65,163 @@ const createDelayedPromise = async ({
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
const props = {
|
|
68
|
-
onUploadFile: async (formData: FormData) =>
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const UploadInputWithDescriptionFromProps: Story = {
|
|
73
|
-
args: {
|
|
74
|
-
...props,
|
|
75
|
-
multiple: true,
|
|
76
|
-
description: 'Custom file description from prop',
|
|
68
|
+
onUploadFile: async (formData: FormData) => {
|
|
69
|
+
return createDelayedPromise();
|
|
77
70
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export const Disabled: Story = {
|
|
81
|
-
args: {
|
|
82
|
-
...props,
|
|
83
|
-
disabled: true,
|
|
71
|
+
onDeleteFile: async (id: string | number) => {
|
|
72
|
+
return createDelayedPromise();
|
|
84
73
|
},
|
|
85
74
|
};
|
|
86
75
|
|
|
87
|
-
|
|
88
|
-
args: {
|
|
89
|
-
...props,
|
|
90
|
-
fileTypes: '*',
|
|
91
|
-
},
|
|
92
|
-
};
|
|
76
|
+
const Template: Story = (args: UploadInputProps) => <UploadInput {...args} />;
|
|
93
77
|
|
|
94
|
-
export const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
export const UploadInputWithDescriptionFromProps: Story = Template.bind({});
|
|
79
|
+
UploadInputWithDescriptionFromProps.args = {
|
|
80
|
+
...props,
|
|
81
|
+
multiple: true,
|
|
82
|
+
description: 'Custom file description from prop',
|
|
99
83
|
};
|
|
100
84
|
|
|
101
|
-
export const
|
|
102
|
-
|
|
103
|
-
...props,
|
|
104
|
-
files,
|
|
105
|
-
multiple: true,
|
|
106
|
-
},
|
|
107
|
-
};
|
|
85
|
+
export const Disabled: Story = Template.bind({});
|
|
86
|
+
Disabled.args = { ...props, disabled: true };
|
|
108
87
|
|
|
109
|
-
export const
|
|
110
|
-
|
|
111
|
-
...props,
|
|
112
|
-
files: [
|
|
113
|
-
{ id: 1, filename: 'Error with default message.png', status: Status.FAILED },
|
|
114
|
-
{
|
|
115
|
-
id: 2,
|
|
116
|
-
filename: 'Error with `string` error.png',
|
|
117
|
-
status: Status.FAILED,
|
|
118
|
-
error: 'Single string error',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: 3,
|
|
122
|
-
filename: 'Error with `obj` error ({ message : `string` }).png',
|
|
123
|
-
status: Status.FAILED,
|
|
124
|
-
error: { message: 'Single obj error' },
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
id: 4,
|
|
128
|
-
filename: 'Error with single error passed in `array`.png',
|
|
129
|
-
status: Status.FAILED,
|
|
130
|
-
errors: ['Single error in array'],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: 5,
|
|
134
|
-
filename: 'Error with multiple `string` errors passed in `array`.png',
|
|
135
|
-
status: Status.FAILED,
|
|
136
|
-
errors: [
|
|
137
|
-
'Error 1',
|
|
138
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
139
|
-
'Error 3',
|
|
140
|
-
],
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
id: 6,
|
|
144
|
-
filename: 'Error with multiple `obj` errors passed in `array`.png',
|
|
145
|
-
status: Status.FAILED,
|
|
146
|
-
errors: [
|
|
147
|
-
{ message: 'Error 1' },
|
|
148
|
-
{
|
|
149
|
-
message:
|
|
150
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
151
|
-
},
|
|
152
|
-
{ message: 'Error 3' },
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
multiple: true,
|
|
157
|
-
},
|
|
158
|
-
};
|
|
88
|
+
export const WithAnyFileType: Story = Template.bind({});
|
|
89
|
+
WithAnyFileType.args = { ...props, fileTypes: '*' };
|
|
159
90
|
|
|
160
|
-
export const
|
|
161
|
-
|
|
162
|
-
...props,
|
|
163
|
-
files,
|
|
164
|
-
onDeleteFile: undefined,
|
|
165
|
-
multiple: true,
|
|
166
|
-
},
|
|
167
|
-
};
|
|
91
|
+
export const WithSingleFileType: Story = Template.bind({});
|
|
92
|
+
WithSingleFileType.args = { ...props, fileTypes: '.zip,application/zip' };
|
|
168
93
|
|
|
169
|
-
export const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
multiple: true,
|
|
175
|
-
},
|
|
94
|
+
export const WithMultipleExistingFiles: Story = Template.bind({});
|
|
95
|
+
WithMultipleExistingFiles.args = {
|
|
96
|
+
...props,
|
|
97
|
+
files,
|
|
98
|
+
multiple: true,
|
|
176
99
|
};
|
|
177
100
|
|
|
178
|
-
export const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
101
|
+
export const WithFileErrors: Story = Template.bind({});
|
|
102
|
+
WithFileErrors.args = {
|
|
103
|
+
...props,
|
|
104
|
+
files: [
|
|
105
|
+
{
|
|
106
|
+
id: 1,
|
|
107
|
+
filename: 'Error with default message.png',
|
|
108
|
+
status: Status.FAILED,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 2,
|
|
112
|
+
filename: 'Error with `string` error.png',
|
|
113
|
+
status: Status.FAILED,
|
|
114
|
+
error: 'Single string error',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 3,
|
|
118
|
+
filename: 'Error with `obj` error ({ message : `string` }).png',
|
|
119
|
+
status: Status.FAILED,
|
|
120
|
+
error: { message: 'Single obj error' },
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 4,
|
|
124
|
+
filename: 'Error with single error passed in `array`.png',
|
|
125
|
+
status: Status.FAILED,
|
|
126
|
+
errors: ['Single error in array'],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 5,
|
|
130
|
+
filename: 'Error with multiple `string` errors passed in `array`.png',
|
|
131
|
+
status: Status.FAILED,
|
|
132
|
+
errors: [
|
|
133
|
+
'Error 1',
|
|
134
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
135
|
+
'Error 3',
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 6,
|
|
140
|
+
filename: 'Error with multiple `obj` errors passed in `array`.png',
|
|
141
|
+
status: Status.FAILED,
|
|
142
|
+
errors: [
|
|
143
|
+
{ message: 'Error 1' },
|
|
144
|
+
{
|
|
145
|
+
message:
|
|
146
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
147
|
+
},
|
|
148
|
+
{ message: 'Error 3' },
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
multiple: true,
|
|
185
153
|
};
|
|
186
154
|
|
|
187
|
-
export const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
body: (
|
|
194
|
-
<img
|
|
195
|
-
alt="brand logo"
|
|
196
|
-
src="https://wise.com/public-resources/assets/logos/wise/brand_logo.svg"
|
|
197
|
-
/>
|
|
198
|
-
),
|
|
199
|
-
},
|
|
200
|
-
},
|
|
155
|
+
export const WithoutDelete: Story = Template.bind({});
|
|
156
|
+
WithoutDelete.args = {
|
|
157
|
+
...props,
|
|
158
|
+
files,
|
|
159
|
+
onDeleteFile: undefined,
|
|
160
|
+
multiple: true,
|
|
201
161
|
};
|
|
202
162
|
|
|
203
|
-
export const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
163
|
+
export const WithUploadFailed: Story = Template.bind({});
|
|
164
|
+
WithUploadFailed.args = {
|
|
165
|
+
...props,
|
|
166
|
+
files: files.slice(0),
|
|
167
|
+
onUploadFile: async () => createDelayedPromise({ successful: false }),
|
|
168
|
+
multiple: true,
|
|
209
169
|
};
|
|
210
170
|
|
|
211
|
-
export const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
171
|
+
export const WithDeleteFailed: Story = Template.bind({});
|
|
172
|
+
WithDeleteFailed.args = {
|
|
173
|
+
...props,
|
|
174
|
+
files: files.slice(0),
|
|
175
|
+
onDeleteFile: async () => createDelayedPromise({ successful: false }),
|
|
176
|
+
multiple: true,
|
|
217
177
|
};
|
|
218
178
|
|
|
219
|
-
export const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
179
|
+
export const CustomConfirmMessage: Story = Template.bind({});
|
|
180
|
+
CustomConfirmMessage.args = {
|
|
181
|
+
...props,
|
|
182
|
+
files: files.slice(0),
|
|
183
|
+
deleteConfirm: {
|
|
184
|
+
title: 'Sure you want to remove this invoice?',
|
|
185
|
+
body: (
|
|
186
|
+
<img
|
|
187
|
+
alt="brand logo"
|
|
188
|
+
src="https://wise.com/public-resources/assets/logos/wise/brand_logo.svg"
|
|
189
|
+
/>
|
|
190
|
+
),
|
|
225
191
|
},
|
|
226
192
|
};
|
|
227
193
|
|
|
228
|
-
export const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
},
|
|
194
|
+
export const WithManualDownloadHandler: Story = Template.bind({});
|
|
195
|
+
WithManualDownloadHandler.args = {
|
|
196
|
+
...props,
|
|
197
|
+
files,
|
|
198
|
+
onDownload: action('Manual download handler'),
|
|
234
199
|
};
|
|
235
200
|
|
|
236
|
-
export const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
201
|
+
export const WithFilesChangeHandler: Story = Template.bind({});
|
|
202
|
+
WithFilesChangeHandler.args = {
|
|
203
|
+
...props,
|
|
204
|
+
files,
|
|
205
|
+
onFilesChange: action('Files change handler'),
|
|
241
206
|
};
|
|
242
207
|
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
await userEvent.keyboard('{Enter}');
|
|
250
|
-
await wait();
|
|
251
|
-
await userEvent.tab();
|
|
252
|
-
await wait();
|
|
253
|
-
await userEvent.tab();
|
|
254
|
-
await wait();
|
|
255
|
-
await userEvent.tab();
|
|
256
|
-
await wait();
|
|
257
|
-
await userEvent.keyboard('{Enter}');
|
|
208
|
+
export const WithMaxFilesToUploadLimit: Story = Template.bind({});
|
|
209
|
+
WithMaxFilesToUploadLimit.args = {
|
|
210
|
+
...props,
|
|
211
|
+
multiple: true,
|
|
212
|
+
maxFiles: 5,
|
|
213
|
+
maxFilesErrorMessage: "Can't upload as maximum number of files allowed are already uploaded",
|
|
258
214
|
};
|
|
259
|
-
const wait = async (time = 250) =>
|
|
260
|
-
new Promise((resolve) => {
|
|
261
|
-
setTimeout(resolve, time);
|
|
262
|
-
});
|
|
263
215
|
|
|
264
|
-
export const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
play: async ({ canvasElement }) => {
|
|
271
|
-
await userEvent.tab();
|
|
272
|
-
await triggerModalAndConfirm();
|
|
273
|
-
await triggerModalAndConfirm({ isLink: false });
|
|
274
|
-
await userEvent.tab();
|
|
275
|
-
await triggerModalAndConfirm();
|
|
276
|
-
},
|
|
216
|
+
export const WithFileSizeErrorMessage: Story = Template.bind({});
|
|
217
|
+
WithFileSizeErrorMessage.args = {
|
|
218
|
+
...props,
|
|
219
|
+
sizeLimit: 1,
|
|
220
|
+
sizeLimitErrorMessage: 'The file is oversized',
|
|
277
221
|
};
|
|
278
222
|
|
|
279
|
-
export const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
multiple: true,
|
|
284
|
-
},
|
|
285
|
-
play: async ({ canvasElement }) => {
|
|
286
|
-
await userEvent.tab();
|
|
287
|
-
await userEvent.tab();
|
|
288
|
-
await userEvent.tab();
|
|
289
|
-
await userEvent.tab();
|
|
290
|
-
await triggerModalAndConfirm();
|
|
291
|
-
await triggerModalAndConfirm();
|
|
292
|
-
await wait();
|
|
293
|
-
await userEvent.tab();
|
|
294
|
-
await triggerModalAndConfirm();
|
|
295
|
-
},
|
|
223
|
+
export const WithCustomUploadButtonTitle: Story = Template.bind({});
|
|
224
|
+
WithCustomUploadButtonTitle.args = {
|
|
225
|
+
...props,
|
|
226
|
+
uploadButtonTitle: 'Upload the VAT receipts for FY 2022-23',
|
|
296
227
|
};
|