phoenix_storybook icon indicating copy to clipboard operation
phoenix_storybook copied to clipboard

Theming support

Open cblavier opened this issue 3 years ago • 0 comments

One should be able to render its storybook components with different themes (to theme the components, not the storybook itself).

Setup themes with

config :phx_live_storybook, MyApp,
  themes: [default: "Default Theme", colorful: "Colorful"]

Once configured a dropdown will be visible in the header with different themes. When updated:

  • the current theme is reflected in the URL (?theme=colorful) and persistent across the navigation
  • the current theme is passed to all components preview as an assign (%{theme: :colorful})
  • the current theme is not passed to code rendering (it should not be visible in code snippets)

cblavier avatar Aug 19 '22 09:08 cblavier