Noora.Modal (noora v0.1.0-alpha.4)

Renders a modal component with customizable headers, content, and footers, supporting various header types, sizes, and event handling.

Summary

Functions

modal(assigns)

Attributes

  • id (:string) (required) - The modal's unique identifier.
  • title (:string) - Title of the modal. Defaults to nil.
  • description (:string) - Description of the modal. Only visible when header_size is 'large'. Defaults to nil.
  • header_type (:string) - Type of the header. Defaults to "default". Must be one of "default", "icon", "success", "info", "warning", or "error".
  • header_size (:string) - Size of the header. Defaults to "large". Must be one of "small", or "large".
  • on_dismiss (:string) - Event to emit when the dismiss icon is clicked. Defaults to nil.
  • on_open_change (:string) - An optional event to fire when the modal is opened or closed. Defaults to nil.

Slots

  • trigger (required) - The modal's trigger. Should be a button that accepts the attributes provided by the slot.
  • header_icon - Icon to be rendered in the header when type is 'icon'.
  • header_button
  • footer - The modal's footer element.
  • inner_block