View Source Bonfire.UI.Common.ReusableModalLive (Bonfire v0.9.10-classic-beta.156)

The classic modal

Properties

  • id :string, required: true - The id of the live component (required by LiveView for stateful components).

  • source_inspector_attrs :map, default: %{}

  • title_text :string, default: nil - The title of the modal. Only used if no title slot is passed.

  • image_preview :boolean, default: false - If the modal is a preview of an image, set this to true.

  • title_class :css_class, default: nil - The classes of the title of the modal

  • modal_class :css_class, default: "" - The classes of the modal.

  • wrapper_class :css_class, default: nil - The classes of the modal wrapper.

  • action_btns_wrapper_class :css_class, default: nil - The classes around the action/submit button(s) on the modal

  • cancel_btn_class :css_class, default: nil - The classes of the close/cancel button on the modal. Only used if no close_btn slot is passed.

  • cancel_label :string, default: nil

  • show :boolean, default: false - Force modal to be open

  • form_opts :map, default: %{}

  • no_actions :boolean, default: false - Optional prop to hide the actions at the bottom of the modal

  • no_header :boolean, default: false - Optional prop to hide the header at the top of the modal

  • no_backdrop :boolean, default: false

  • opts :keyword, default: [] - Additional attributes to add onto the modal wrapper

  • autocomplete :list, default: []

Slots

  • open_btn, arg: [autocomplete: :list, value: :any] - Slots for the contents of the modal, title, buttons...

  • action_btns

  • cancel_btn

  • title

  • default, arg: [autocomplete: :list, value: :any]

Summary

Functions

Link to this function

handle_event(event, attrs, socket)

View Source

Callback implementation for Phoenix.LiveComponent.handle_event/3.

Callback implementation for Phoenix.LiveComponent.mount/1.

Callback implementation for Phoenix.LiveComponent.render/1.

Link to this macro

sigil_p(route, extra)

View Source (macro)

Callback implementation for Phoenix.LiveComponent.update/2.