Raxol.Playground.State (Raxol v2.0.1)

View Source

State management for the Raxol Playground.

Summary

Functions

Adds an entry to history.

Creates a new playground state.

Types

t()

@type t() :: %Raxol.Playground.State{
  bookmarks: list(),
  catalog: list(),
  code_visible: boolean(),
  current_props: map(),
  current_state: map(),
  history: list(),
  layout: :split | :tabs | :full,
  port: integer(),
  preview_mode: :terminal | :web,
  selected_component: map() | nil,
  theme: atom()
}

Functions

add_bookmark(state, component_id, props, component_state)

Adds a bookmark.

add_to_history(state, entry)

Adds an entry to history.

load_bookmark(state, bookmark_id)

Loads a bookmark.

new(opts \\ [])

Creates a new playground state.