forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preview.tsx
41 lines (37 loc) · 1.39 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
41
import {PortalProvider} from '@gorhom/portal';
import type {Parameters} from '@storybook/types';
import React from 'react';
import Onyx from 'react-native-onyx';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import ComposeProviders from '@src/components/ComposeProviders';
import HTMLEngineProvider from '@src/components/HTMLEngineProvider';
import {LocaleContextProvider} from '@src/components/LocaleContextProvider';
import OnyxProvider from '@src/components/OnyxProvider';
import {EnvironmentProvider} from '@src/components/withEnvironment';
import {KeyboardStateProvider} from '@src/components/withKeyboardState';
import {WindowDimensionsProvider} from '@src/components/withWindowDimensions';
import ONYXKEYS from '@src/ONYXKEYS';
import './fonts.css';
Onyx.init({
keys: ONYXKEYS,
initialKeyStates: {
[ONYXKEYS.NETWORK]: {isOffline: false, isBackendReachable: true},
},
});
const decorators = [
(Story: React.ElementType) => (
<ComposeProviders
components={[OnyxProvider, LocaleContextProvider, HTMLEngineProvider, SafeAreaProvider, PortalProvider, EnvironmentProvider, KeyboardStateProvider, WindowDimensionsProvider]}
>
<Story />
</ComposeProviders>
),
];
const parameters: Parameters = {
controls: {
matchers: {
color: /(background|color)$/i,
},
},
};
export {decorators, parameters};