Raxol.UI.Components.Progress.Component (Raxol v2.0.1)

View Source

Core progress component implementation.

Provides the base functionality for progress indicators including initialization, rendering, and event handling.

Summary

Functions

Handles component events.

Initializes the progress component state.

Renders the progress component.

Returns available spinner types.

Updates the component state.

Types

props()

@type props() :: map()

state()

@type state() :: %{
  value: number(),
  max: number(),
  type: atom(),
  indeterminate: boolean(),
  frame: integer()
}

Functions

handle_event(arg1, arg2, state)

@spec handle_event(term(), props(), state()) :: {:ok, state()} | {:update, state()}

Handles component events.

init(props)

@spec init(props()) :: state()

Initializes the progress component state.

render(state, props)

@spec render(state(), props()) :: binary()

Renders the progress component.

spinner_types()

@spec spinner_types() :: [atom()]

Returns available spinner types.

update(arg1, state)

@spec update(term(), state()) :: state()

Updates the component state.