Liking cljdoc? Tell your friends :D

wagoe.shared.ui.core.modal

Modal on native <dialog>. The browser closes it on Esc, the backdrop and the close button, makes the page behind it inert and returns focus on close; components.js (ui-style) only opens it.

Modal on native <dialog>. The browser closes it on Esc, the backdrop and
the close button, makes the page behind it inert and returns focus on
close; components.js (ui-style) only opens it.
raw docstring

confirm-attrsclj

(confirm-attrs id)

Attributes for the element carrying the htmx request: it waits for the confirm modal id instead of hx-confirm's window.confirm.

Attributes for the element carrying the htmx request: it waits for the
confirm modal `id` instead of `hx-confirm`'s window.confirm.
sourceraw docstring

confirm-modalclj

(confirm-modal {:keys [id title message confirm-label cancel-label danger?]
                :or {confirm-label [:t :common/button-confirm]
                     cancel-label [:t :common/button-cancel]}})

A modal that answers an htmx request carrying (confirm-attrs id): the request goes ahead only on the confirm button. Focus starts on cancel.

opts: :id, :title as for modal :message the question :confirm-label default [:t :common/button-confirm] :cancel-label default [:t :common/button-cancel] :danger? the confirm button in the error colour

A modal that answers an htmx request carrying (confirm-attrs id): the
request goes ahead only on the confirm button. Focus starts on cancel.

opts:
  :id, :title     as for modal
  :message        the question
  :confirm-label  default [:t :common/button-confirm]
  :cancel-label   default [:t :common/button-cancel]
  :danger?        the confirm button in the error colour
sourceraw docstring

(modal {:keys [id title open? closable? close-label class attrs]
        :or {closable? true close-label [:t :common/button-close]}}
       &
       body)

A <dialog> with body in daisyUI's modal box.

opts: :id required; what open-attrs and confirm-attrs point at :title heading, also the dialog's accessible name :open? open as soon as it is in the page: for content an htmx swap brings in :closable? the corner close button (default true) :close-label its accessible name (default [:t :common/button-close]) :class extra classes on the modal box :attrs extra attributes on the <dialog>; a :class adds to "modal"

A <dialog> with `body` in daisyUI's modal box.

opts:
  :id          required; what open-attrs and confirm-attrs point at
  :title       heading, also the dialog's accessible name
  :open?       open as soon as it is in the page: for content an htmx
               swap brings in
  :closable?   the corner close button (default true)
  :close-label its accessible name (default [:t :common/button-close])
  :class       extra classes on the modal box
  :attrs       extra attributes on the <dialog>; a :class adds to "modal"
sourceraw docstring

open-attrsclj

(open-attrs id)

Attributes for a button that opens the modal id.

Attributes for a button that opens the modal `id`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close