ZoonkWeb.Components.AsyncPage (Zoonk v0.1.0-dev)

View Source

Wrapper for async_result.

Summary

Functions

Wrapper for async_result.

Functions

async_page(assigns)

Wrapper for async_result.

This component is designed for cases where we use assign_async and we want to display loading, error, or success states.

Attributes

  • scope (Zoonk.Scope) (required) - Scope for the component, used for layout rendering.
  • flash (:map) (required) - Flash messages to display.
  • class (:any) - Additional CSS classes for the component. Defaults to nil.
  • data (:any) (required) - The data to be displayed.
  • loading_title (:string) (required) - Title to display while loading.
  • loading_subtitle (:string) - Subtitle to display while loading.
  • loading_feature (:string) - Feature to display while loading.
  • failure_message (:string) - Message to display on failure.
  • failure_link (:string) - Link to display on failure.
  • failure_link_text (:string) - Text for the failure link.

Slots

  • inner_block - Content to display when data is available.