React Native Storybook - No addons loaded

49 views Asked by At

I've implemented Storybook in my React Native project, and everything seems to be working fine except for the addons – they're not loading. Could someone assist me in resolving this issue and getting the addons to load properly?

Here is the story:

import { ComponentMeta, ComponentStory } from '@storybook/react-native';

import { Text } from './Text';

const TextMeta: ComponentMeta<typeof Text> = {
  title: 'Text',
  component: Text,
  args: {
    color: 'red',
  },
  argTypes: {
    color: {
      options: ['red', 'blue', 'green'],
      control: { type: 'radio' },
    },
  },
};

export default TextMeta;

type TextStory = ComponentStory<typeof Text>;

export const Primary: TextStory = args => <Text {...args}> Hello World </Text>;

and the main.js

const config = {
  stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
  addons: [
    '@storybook/addon-ondevice-actions',
    '@storybook/addon-ondevice-backgrounds',
    '@storybook/addon-ondevice-controls',
    '@storybook/addon-ondevice-notes',
  ],
  framework: {
    name: '@storybook/react-native',
    options: {},
  },
};

export default config;

And this is how it looks enter image description here

0

There are 0 answers