-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
38 lines (29 loc) · 1.1 KB
/
index.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
31
32
33
34
35
36
37
38
import {storiesOf as storybookStoriesOf} from '@storybook/react-native';
import storybookTab from './storybook-tab';
import storybookTabNoStyle from './storybook-tab-no-style';
import addDecorators from './add-decorators';
export {configureStoriesWithDecorators, getStorybook} from './get-storybook';
global.Promise = require('promise');
export function storiesOf(...args) {
return addDecorators(
storybookStoriesOf(...args)
);
}
export function getStorybookTabNoStyle(resolveFunction, moduleName, options) {
const ReactNative = require('react-native');
Object.defineProperty(ReactNative, 'AsyncStorage', {
get() {
return require('@react-native-community/async-storage').default;
},
});
return storybookTabNoStyle(resolveFunction, moduleName, options);
}
export function getStorybookTab(resolveFunction, moduleName, options) {
const ReactNative = require('react-native');
Object.defineProperty(ReactNative, 'AsyncStorage', {
get() {
return require('@react-native-community/async-storage').default;
},
});
return storybookTab(resolveFunction, moduleName, options);
}