styleguidist/react-styleguidist

Try rendering examples in iframe

Open

#1.496 geöffnet am 12. Dez. 2019

Auf GitHub ansehen
 (4 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)TypeScript (1.416 Forks)github user discovery
enhancementhelp wanted

Repository-Metriken

Stars
 (11.091 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Right now each example is a separate React app that renders into the same DOM as the Styleguidist app itself. This approach have some problems:

  • We share styles between Styleguidist and user's component, we use some hacks to isolate Stylegudist styles but sometimes styles still affect each other.
  • We can't implement a nice responsive design preview, because we can't affect media queries in components without resizing the window.

Possible issues of the iframe approach:

  • It could be slower than the current approach.
  • Interaction between Styleguidist and iframes could be more complex.
  • We'll need to add global styles to every iframe instead of adding them once at the Styleguidst root level.

Contributor Guide