View Source PetalComponents.Button (petal_components v1.4.1)

Summary

Functions

Attributes

  • size (:string) - button sizes. Defaults to "md".
  • variant (:string) - button variant. Defaults to "solid".
  • color (:string) - button color. Defaults to "primary".
  • to (:string) - link path. Defaults to nil.
  • loading (:boolean) - indicates a loading state. Defaults to false.
  • disabled (:boolean) - indicates a disabled state. Defaults to false.
  • icon (:atom) - name of a Heroicon at the front of the button. Defaults to nil.
  • with_icon (:boolean) - adds some icon base classes. Defaults to false.
  • link_type (:string) - Defaults to "button".
  • class (:string) - CSS class. Defaults to "".
  • label (:string) - labels your button. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • size (:string) - Defaults to "sm".
  • color (:string) - Defaults to "gray".
  • to (:string) - link path. Defaults to nil.
  • loading (:boolean) - indicates a loading state. Defaults to false.
  • disabled (:boolean) - indicates a disabled state. Defaults to false.
  • with_icon (:boolean) - adds some icon base classes. Defaults to false.
  • link_type (:string) - Defaults to "button".
  • class (:string) - CSS class. Defaults to "".
  • tooltip (:string) - tooltip text. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Functions

Attributes

  • size (:string) - button sizes. Defaults to "md".
  • variant (:string) - button variant. Defaults to "solid".
  • color (:string) - button color. Defaults to "primary".
  • to (:string) - link path. Defaults to nil.
  • loading (:boolean) - indicates a loading state. Defaults to false.
  • disabled (:boolean) - indicates a disabled state. Defaults to false.
  • icon (:atom) - name of a Heroicon at the front of the button. Defaults to nil.
  • with_icon (:boolean) - adds some icon base classes. Defaults to false.
  • link_type (:string) - Defaults to "button".
  • class (:string) - CSS class. Defaults to "".
  • label (:string) - labels your button. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block
Link to this function

get_icon_button_size_classes(arg)

View Source
Link to this function

get_icon_button_spinner_size_classes(arg)

View Source

Attributes

  • size (:string) - Defaults to "sm".
  • color (:string) - Defaults to "gray".
  • to (:string) - link path. Defaults to nil.
  • loading (:boolean) - indicates a loading state. Defaults to false.
  • disabled (:boolean) - indicates a disabled state. Defaults to false.
  • with_icon (:boolean) - adds some icon base classes. Defaults to false.
  • link_type (:string) - Defaults to "button".
  • class (:string) - CSS class. Defaults to "".
  • tooltip (:string) - tooltip text. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block