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

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

Uses Makeup libray for syntax highlighting.

Link to this section Summary

Functions

Renders a function component code snippet, wrapped in a <pre> tag.

Renders a live component code snippet, wrapped in a <pre> tag.

Link to this section Functions

Link to this function

render_component_code(function, variation, assigns \\ %{})

View Source

Renders a function component code snippet, wrapped in a <pre> tag.

Link to this function

render_live_component_code(module, variation, assigns \\ %{})

View Source

Renders a live component code snippet, wrapped in a <pre> tag.