File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change
1
+ import type { StorybookConfig } from '@storybook/react-webpack5' ;
1
2
import { join , dirname } from 'path' ;
2
- // import * as ws from 'ws';
3
3
/**
4
4
* This function is used to resolve the absolute path of a package.
5
5
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
@@ -8,8 +8,11 @@ function getAbsolutePath(value) {
8
8
return dirname ( require . resolve ( join ( value , 'package.json' ) ) ) ;
9
9
}
10
10
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 = {
13
16
stories : [ '../components/**/*.stories.?(ts|tsx|js|jsx)' ] ,
14
17
addons : [
15
18
getAbsolutePath ( '@storybook/addon-essentials' ) ,
@@ -38,4 +41,4 @@ const config = {
38
41
} ,
39
42
} ;
40
43
41
- export default config ;
44
+ export default main ;
Original file line number Diff line number Diff line change 1
1
import { View , Appearance } from 'react-native' ;
2
2
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds' ;
3
- import { Preview } from '@storybook/react' ;
3
+ import type { Preview } from '@storybook/react' ;
4
4
5
5
const preview : Preview = {
6
6
decorators : [
You can’t perform that action at this time.
0 commit comments