From 6e2d1b2e56196a960748fe8377758b0cac96c08a Mon Sep 17 00:00:00 2001 From: Edgar Khanzadian Date: Tue, 20 Aug 2024 14:55:57 +0400 Subject: [PATCH] fix: ui storybook --- packages/ui/index.js | 8 ++++++++ packages/ui/src/.storybook-native/main.ts | 2 +- packages/ui/src/.storybook-native/storybook.requires.ts | 8 +------- 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 packages/ui/index.js diff --git a/packages/ui/index.js b/packages/ui/index.js new file mode 100644 index 00000000..1dc42d9a --- /dev/null +++ b/packages/ui/index.js @@ -0,0 +1,8 @@ +import { registerRootComponent } from 'expo'; + +import App from './src/app'; + +// registerRootComponent calls AppRegistry.registerComponent('main', () => App); +// It also ensures that whether you load the app in Expo Go or in a native build, +// the environment is set up appropriately +registerRootComponent(App); diff --git a/packages/ui/src/.storybook-native/main.ts b/packages/ui/src/.storybook-native/main.ts index 4f02d634..a1c0c8d5 100644 --- a/packages/ui/src/.storybook-native/main.ts +++ b/packages/ui/src/.storybook-native/main.ts @@ -1,5 +1,5 @@ /** @type{import("@storybook/react-native").StorybookConfig} */ export default { stories: ['../**/*.native.stories.?(ts|tsx|js|jsx)'], - addons: ['@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-actions'], + addons: [], }; diff --git a/packages/ui/src/.storybook-native/storybook.requires.ts b/packages/ui/src/.storybook-native/storybook.requires.ts index 744e7726..f053af98 100644 --- a/packages/ui/src/.storybook-native/storybook.requires.ts +++ b/packages/ui/src/.storybook-native/storybook.requires.ts @@ -1,6 +1,4 @@ /* do not change this file, it is auto generated by storybook. */ -import '@storybook/addon-ondevice-actions/register'; -import '@storybook/addon-ondevice-controls/register'; import { start } from '@storybook/react-native'; const normalizedStories = [ @@ -23,10 +21,6 @@ const normalizedStories = [ global.STORIES = normalizedStories; export const view = start({ - annotations: [ - require('./preview'), - require('@storybook/react-native/dist/preview'), - require('@storybook/addon-actions/preview'), - ], + annotations: [require('./preview')], storyEntries: normalizedStories, });