phoenix_storybook
phoenix_storybook copied to clipboard
Theming support
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)