View Source PhxLiveStorybook.Rendering.CodeRenderer (phx_live_storybook v0.4.0)

Responsible for rendering your components code snippet, for a given PhxLiveStorybook.Variation.

Uses the Makeup libray for syntax highlighting.

Link to this section Summary

Functions

Renders source of a component story. Returns a rendered HEEx template.

Renders code snippet of a specific variation for a given component story. Returns a rendered HEEx template.

Link to this section Functions

Link to this function

render_component_source(story, assigns \\ %{})

View Source

Renders source of a component story. Returns a rendered HEEx template.

Link to this function

render_multiple_variations_code(story, fun_or_mod, variations, template, assigns \\ %{})

View Source

Renders code snippet for a set of variations.

Link to this function

render_variation_code(story, variation_id, opts \\ [])

View Source

Renders code snippet of a specific variation for a given component story. Returns a rendered HEEx template.