OctantisWeb.Components.Polaris.EmptyState (octantis v0.1.12)

View Source

Empty states are used when a list, table, or chart has no items or data to show. This is an opportunity to provide explanation or guidance to help merchants progress. The empty state component is intended for use when a full page in the admin is empty, and not for individual elements or areas in the interface.

Examples

  <.empty_state image="/images/relax.svg" heading="You don't have sections">
    <:action content="Broswe library" />
    Things will go here, eventually...
  </.empty_state>

See

Summary

Functions

Empty states are used when a list, table, or chart has no items or data to show. This is an opportunity to provide explanation or guidance to help merchants progress. The empty state component is intended for use when a full page in the admin is empty, and not for individual elements or areas in the interface.

Functions

empty_state(assigns)

Empty states are used when a list, table, or chart has no items or data to show. This is an opportunity to provide explanation or guidance to help merchants progress. The empty state component is intended for use when a full page in the admin is empty, and not for individual elements or areas in the interface.

Examples

  <.empty_state image="/images/relax.svg" heading="You don't have sections">
    <:action content="Broswe library" />
    Things will go here, eventually...
  </.empty_state>

See

Attributes

  • heading (:string) - The empty state heading.
  • image (:string) (required) - The path to the image to display. The image should have ~40px of white space above when empty state is used within a card, modal, or navigation component.
  • image_contained (:boolean) - Whether or not to limit the image to the size of its container on large screens. Defaults to false.
  • full_width (:boolean) - Whether or not the content should span the full width of its container. Defaults to false.

Slots

  • inner_block
  • action - Accepts attributes:
    • content (:string) - Content the action displays.
    • disabled (:boolean) - Whether or not the action is disabled.
    • variant (:string) - Changes the visual appearance of the Button.Must be one of "plain", "primary", "secondary", "tertiary", or "monochromePlain".
    • tone (:string) - Sets the color treatment of the Button.Must be one of "critical", or "success".
    • full_width (:boolean) - Allows the button to grow to the width of its container.
    • size (:string) - Changes the size of the button, giving it more or less padding.Must be one of "micro", "slim", "medium", or "large".
    • navigate (:string) - Passes through to .link component.
    • patch (:string) - Passes through to .link component.
    • href (:string) - Passes through to .link component.
    • target (:string) - Passes through to .link component.
    • icon (:any) - Source of the icon.Examples include &OctantisWeb.Components.Polaris.Icons.arrow_right/1.
    • phx_click (:any) - Click function passed through to the button.
  • secondary_action - Accepts attributes:
    • content (:string) - Content the action displays.
    • disabled (:boolean) - Whether or not the action is disabled.
    • variant (:string) - Changes the visual appearance of the Button.Must be one of "plain", "primary", "secondary", "tertiary", or "monochromePlain".
    • tone (:string) - Sets the color treatment of the Button.Must be one of "critical", or "success".
    • full_width (:boolean) - Allows the button to grow to the width of its container.
    • size (:string) - Changes the size of the button, giving it more or less padding.Must be one of "micro", "slim", "medium", or "large".
    • navigate (:string) - Passes through to .link component.
    • patch (:string) - Passes through to .link component.
    • href (:string) - Passes through to .link component.
    • target (:string) - Passes through to .link component.
    • icon (:any) - Source of the icon.Examples include &OctantisWeb.Components.Polaris.Icons.arrow_right/1.
    • phx_click (:any) - Click function passed through to the button.