-
Notifications
You must be signed in to change notification settings - Fork 177
/
preview.jsx
36 lines (33 loc) · 817 Bytes
/
preview.jsx
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
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 },
options: {
storySort: {
method: 'alphabetical',
order: ['Design Tokens', 'Library', 'App', 'ODD', 'AI'],
},
},
}
// Global decorator to apply the styles to all stories
export const decorators = [
Story => (
<I18nextProvider i18n={i18n}>
<GlobalStyle isOnDevice={true} />
<Story />
</I18nextProvider>
),
]