Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook composition #635

Open
PatrickMunsey opened this issue Oct 3, 2023 · 0 comments
Open

Storybook composition #635

PatrickMunsey opened this issue Oct 3, 2023 · 0 comments

Comments

@PatrickMunsey
Copy link

PatrickMunsey commented Oct 3, 2023

I've setup resium in a react-vite storybook and it's working well for me to develop some custom components. I'm now trying to 'compose' the already published Resium storybook for the core components at https://resium.reearth.io/examples but am unable to do so.

Some notes:

// maint.ts
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
  refs: {
    'external-reaviz': { // example of a working composed storybook
      title: 'Reaviz',
      url: 'https://reaviz.io',
      expanded: false, 
    },
    'external-resium': { // Trying to get resium storybook composition working
      title: 'Resium',
      url: 'https://resium.reearth.io/examples/',
      expanded: false, // Optional, true by default
    },
  },
};
  • The Resium storybook is hosted on the /examples subdirectory. The other storybooks I've successfully composed are on the base path. This probably isn't the cause but it is one thing different.
  • I've noticed a CORS error when pointing directly to the index.html file. I'm wondering if your hosting CORS config may be limiting the ability to compose the storybook
  • I'm using storybook v7. I don't think there should be an issue with this if you are still using v6 though.

reference-external-storybooks-composition
Screenshot 2023-10-03 020711
Screenshot 2023-10-03 020812
Screenshot 2023-10-03 021725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant