View Source PhoenixDuskmoon.Component.Button (PhoenixDuskmoon v5.0.1)

render button

Summary

Functions

Generates a button.

Functions

dm_btn(assigns)

@spec dm_btn(map()) :: Phoenix.LiveView.Rendered.t()

Generates a button.

Attributes

  • id (:string) (required)
  • class (:any) - the class of the button. Defaults to nil.
  • confirm_class (:any) - the class of the confirm action button in dialog. Defaults to nil.
  • cancel_class (:any) - the class of the cancel action button in dialog. Defaults to nil.
  • confirm_title (:string) - Defaults to "".
  • confirm (:string) - Defaults to "".
  • Global attributes are accepted. Additional attributes to confirm action button.

Slots

  • inner_block (required) - The content rendered inside of the button tag.

Examples

<.dm_btn id="show-btn">Show</.dm_btn>
<.dm_btn id="remove-btn">Remove</.dm_btn>