Raxol.Playground.CodeGenerator (Raxol v2.0.1)

View Source

Generates Elixir code for components with their current configuration.

This module takes a component definition, props, and state, and generates clean, readable Elixir code that can be copied and used in a real application.

Summary

Functions

Generates code for a component with current props and state.

Generates code for multiple components (composition).

Generates a complete example application.

Generates test code for the component.

Functions

generate(component, props \\ %{}, state \\ %{}, opts \\ [])

Generates code for a component with current props and state.

generate_composition(components, layout \\ :vertical)

Generates code for multiple components (composition).

generate_example_app(component, props, state)

Generates a complete example application.

generate_test_code(component, props, state)

Generates test code for the component.