-
Notifications
You must be signed in to change notification settings - Fork 176
/
preview.js
30 lines (27 loc) · 682 Bytes
/
preview.js
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
import React from 'react'
import { I18nextProvider } from 'react-i18next'
import { GlobalStyle } from '../app/src/atoms/GlobalStyle'
import { i18n } from '../app/src/i18n'
export const customViewports = {
onDeviceDisplay: {
name: 'Touchscreen',
type: 'tablet',
styles: {
width: '1024px',
height: '600px',
},
},
}
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
viewport: { viewports: customViewports },
}
// Global decorator to apply the styles to all stories
export const decorators = [
Story => (
<I18nextProvider i18n={i18n}>
<GlobalStyle isOnDevice={true} />
<Story />
</I18nextProvider>
),
]