View Source Bonfire.UI.Common.OpenModalLive (bonfire v0.3.5-classic-beta.10)

The classic modal

properties

Properties

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

  • open_btn_text :string, default: nil - The title of the button used to open the modal. Only used if no open_btn slot is passed.

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

  • title_class :css_class, default: "font-bold text-base flex-1" - The classes of the title of the modal

  • open_btn_class :css_class, default: "" - The classes of the open button for the modal. Only used if no open_btn slot is passed.

  • open_btn_opts :any, default: []

  • href :string, default: nil - Optional link on the open btn.

  • open_btn_hook :string, default: nil - Optional JS hook on the open btn.

  • cancel_btn_class :css_class, default: "btn btn-outline btn-sm normal-case" - The classes of the close/cancel button on the modal. Only used if no close_btn slot is passed.

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

  • form_opts :any, default: []

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

  • reusable_modal_component :atom, default: Bonfire.UI.Common.ReusableModalLive - The classes of the title of the modal

  • reusable_modal_id :string, default: "modal" - The ID of this instance of the modal

  • modal_assigns :any, default: [] - Additional assigns to pass on to the modal component

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

  • autocomplete :list, default: []

slots

Slots

  • default, args: [:autocomplete] - Slots for the contents of the modal, title, buttons...

  • open_btn

  • action_btns

  • cancel_btn

  • title

Link to this section Summary

Link to this section Functions