OctantisWeb.Components.Polaris.Button (octantis v0.1.15)

View Source

Cards are used to group similar concepts and tasks together for merchants to scan, read, and get things done. It displays content in a familiar and recognizable style.

Examples

  <.button>
    Add product
  </.button>

See

Summary

Functions

Cards are used to group similar concepts and tasks together for merchants to scan, read, and get things done. It displays content in a familiar and recognizable style.

Functions

button(assigns)

Cards are used to group similar concepts and tasks together for merchants to scan, read, and get things done. It displays content in a familiar and recognizable style.

Examples

  <.button>
    Add product
  </.button>

See

Attributes

  • class (:any) - The class to be passed down to the button.
  • content (:string) - Content of the button. Defaults to nil.
  • disabled (:boolean) - Whether or not the action is disabled. Defaults to false.
  • size (:string) - Changes the size of the button, giving it more or less padding. Defaults to "medium".
  • text_align (:string) - Changes the inner text alignment of the button. Defaults to "center".
  • full_width (:boolean) - Allows the button to grow to the width of its container. Defaults to false.
  • disclosure (:string) - Displays the button with a disclosure icon. Defaults to down when set to true.Must be one of "down", "up", or "select".
  • data_primary_link (:boolean) - Indicates whether or not the button is the primary navigation link when rendered inside of an IndexTable.Row.
  • tone (:string) - Sets the color treatment of the Button.Must be one of "critical", or "success".
  • variant (:string) - Changes the visual appearance of the Button. Defaults to "secondary".
  • submit (:boolean) - Allows the button to submit a form. Defaults to false.
  • name (:string) - Name to be passed down to the button. Defaults to nil.
  • value (:string) - Name to be passed down to the button. Defaults to nil.
  • phx_click (:any) - Defaults to nil.
  • phx_target (:any) - Allows setting the target for the button. Defaults to nil.
  • phx_values (:list) - A list of key value pairs to be passed as a value for actions. See assign_phx_bindings/2. Defaults to [].
  • style (:string) - Style attribute.
  • align_items (:string) - Style attribute.
  • align_self (:string) - Style attribute.
  • display (:string) - Style attribute.
  • flex_grow (:string) - Style attribute.
  • grid_auto_rows (:string) - Style attribute.
  • grid_template_columns (:string) - Style attribute.
  • grid_template_rows (:string) - Style attribute.
  • justify_content (:string) - Style attribute.
  • margin (:string) - Style attribute.
  • max_height (:string) - Style attribute.
  • min_height (:string) - Style attribute.
  • object_fit (:string) - Style attribute.
  • opacity (:string) - Style attribute.
  • Global attributes are accepted.

Slots

  • icon - Icon to display to the left of the button content.
  • inner_block