-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstorybook.requires.ts
More file actions
52 lines (39 loc) · 1.16 KB
/
storybook.requires.ts
File metadata and controls
52 lines (39 loc) · 1.16 KB
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
42
43
44
45
46
47
48
49
50
51
52
/* do not change this file, it is auto generated by storybook. */
import { start, updateView, View } from '@storybook/react-native';
import "@storybook/addon-ondevice-notes/register";
import "@storybook/addon-ondevice-controls/register";
import "@storybook/addon-ondevice-actions/register";
const normalizedStories = [
{
titlePrefix: "",
directory: "./src",
files: "**/*.stories.?(ts|tsx|js|jsx)",
importPathMatcher: /^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(?:ts|tsx|js|jsx)?)$/,
// @ts-ignore
req: require.context(
'../src',
true,
/^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(?:ts|tsx|js|jsx)?)$/
),
}
];
declare global {
var view: View;
var STORIES: typeof normalizedStories;
}
const annotations = [
require('./preview'),
require("@storybook/react-native/preview")
];
global.STORIES = normalizedStories;
// @ts-ignore
module?.hot?.accept?.();
if (!global.view) {
global.view = start({
annotations,
storyEntries: normalizedStories,
});
} else {
updateView(global.view, annotations, normalizedStories);
}
export const view: View = global.view;