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

Share styleguidist components between applications #2161

Open
BennyHudson opened this issue Jan 24, 2024 · 0 comments
Open

Share styleguidist components between applications #2161

BennyHudson opened this issue Jan 24, 2024 · 0 comments

Comments

@BennyHudson
Copy link

Hello,

We currently have a heavily customised Styleguidist project running using Lerna supporting ~500 components. We're looking at breaking this down a bit so that we can have multiple projects with fewer components, but we'd like to retain the look and feel between these applications.

I was just wondering if there's any way of consuming published components as part of the Styleguide config components object? Currently it looks as though you can only provide a relative path to components, but we would like to be able to publish a package and then import { ThemeProvider } from 'package-name' and pass this in to the components object.

Basically something like:

import { ThemeProvider } from 'wherever'
import { StyleguideRenderer } from 'this-package'

export default {
  /**
   * Generic Setup
   */
  skipComponentsWithoutExample: true,
  pagePerSection: true,
  template: {
    favicon: 'favicon.ico',
    lang: 'en',
  },
  styleguideComponents: {
    Wrapper: ThemeProvider,
    StyleGuideRenderer: StyleguideRenderer,
  },
...

Is this possible? Not sure if something like this - https://react-styleguidist.js.org/docs/cookbook#how-to-change-styles-of-a-style-guide - would already work?

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