View Source SaladUI.AlertDialog (SaladUI v0.13.0)

Implement of Alert Dialog components

Summary

Functions

Alert Dialog component

Examples:

<.alert_dialog>
   <.alert_dialog_trigger aschild>
     <button variant="outline">show dialog</button>
   </.alert_dialog_trigger>
   <.alert_dialog_content>
     <.alert_dialog_header>
       <.alert_dialog_title>are you absolutely sure?</.alert_dialog_title>
       <.alert_dialog_description>
         this action cannot be undone. this will permanently delete your
         account and remove your data from our servers.
       </.alert_dialog_description>
     </.alert_dialog_header>
     <.alert_dialog_footer>
       <.alert_dialog_cancel>cancel</.alert_dialog_cancel>
       <.alert_dialog_action>continue</.alert_dialog_action>
     </.alert_dialog_footer>
   </.alert_dialog_content>
 </.alert_dialog>

Attributes

  • id (:string) (required) - Id to identify alert dialog, alert_dialog_trigger use this id to trigger show dialog.
  • open (:boolean) - Defaults to false.

Slots

  • inner_block (required)
Link to this function

alert_dialog_action(assigns)

View Source

Render

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_cancel(assigns)

View Source

Render

Attributes

  • builder (:map) (required) - Builder instance for Alert Dialog.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_content(assigns)

View Source

Render

Attributes

  • builder (:map) (required) - Builder instance for alert dialog.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_description(assigns)

View Source

Render

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_footer(assigns)

View Source

Render

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_header(assigns)

View Source

Render

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_title(assigns)

View Source

Render

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

alert_dialog_trigger(assigns)

View Source

Render

Attributes

  • builder (:map) (required) - Builder instance for alert dialog.
  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)
Link to this function

hide_alert_dialog(js \\ %JS{}, builder)

View Source

Hide alert dialog

Link to this function

show_alert_dialog(js \\ %JS{}, builder)

View Source

Show alert dialog