-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathpreview.tsx
40 lines (37 loc) · 1.05 KB
/
preview.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import './main.css';
import { Preview } from '@storybook/preact';
import { DEFAULT_COUNTRY_CODE, DEFAULT_SHOPPER_LOCALE, DEFAULT_AMOUNT_VALUE, SHOPPER_LOCALES } from '../storybook/config/commonConfig';
//import { initialize as initializeMSW, mswLoader } from 'msw-storybook-addon';
// from the docs: https://github.com/mswjs/msw-storybook-addon
// initializeMSW({
// onUnhandledRequest: 'bypass'
// });
const preview: Preview = {
argTypes: {
useSessions: {
control: 'boolean'
},
countryCode: {
control: 'text'
},
shopperLocale: {
control: 'select',
options: SHOPPER_LOCALES
},
amount: {
control: 'number'
},
showPayButton: {
control: 'boolean'
}
},
args: {
useSessions: true,
countryCode: DEFAULT_COUNTRY_CODE,
shopperLocale: DEFAULT_SHOPPER_LOCALE,
amount: DEFAULT_AMOUNT_VALUE,
showPayButton: true
}
//loaders: [mswLoader]
};
export default preview;