Skip to content

Commit 0f52018

Browse files
committed
fix: adjustments
1 parent d420518 commit 0f52018

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

examples/expo-example/.storybook-web/main.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import type { StorybookConfig } from '@storybook/react-webpack5';
12
import { join, dirname } from 'path';
2-
// import * as ws from 'ws';
33
/**
44
* This function is used to resolve the absolute path of a package.
55
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
@@ -8,8 +8,11 @@ function getAbsolutePath(value) {
88
return dirname(require.resolve(join(value, 'package.json')));
99
}
1010

11-
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
12-
const config = {
11+
type ServerStorybookConfig = StorybookConfig & {
12+
reactNativeServerOptions: { host: string; port: number };
13+
};
14+
15+
const main: ServerStorybookConfig = {
1316
stories: ['../components/**/*.stories.?(ts|tsx|js|jsx)'],
1417
addons: [
1518
getAbsolutePath('@storybook/addon-essentials'),
@@ -38,4 +41,4 @@ const config = {
3841
},
3942
};
4043

41-
export default config;
44+
export default main;

examples/expo-example/.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { View, Appearance } from 'react-native';
22
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';
3-
import { Preview } from '@storybook/react';
3+
import type { Preview } from '@storybook/react';
44

55
const preview: Preview = {
66
decorators: [

0 commit comments

Comments
 (0)