mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
The style was already being shared with a sibling component. Now we can instantiate a plain old 'modal'.
11 lines
798 B
Plaintext
11 lines
798 B
Plaintext
%div{ id: @id, "data-controller": "modal #{@controller}", "data-action": "keyup@document->modal#closeIfEscapeKey", "data-#{@controller}-reflex-value": @reflex }
|
|
.reveal-modal-bg.fade{ "data-modal-target": "background", "data-action": "click->modal#close" }
|
|
.reveal-modal.fade.tiny.modal-component{ "data-modal-target": "modal" }
|
|
= content
|
|
|
|
= render @message if @message
|
|
|
|
%div{ class: "modal-actions #{@actions_alignment_class}" }
|
|
%input{ class: "button icon-plus #{close_button_class}", type: 'button', value: @cancel_button_text, "data-action": "click->modal#close" }
|
|
%input{ id: 'modal-confirm-button', class: "button icon-plus #{@confirm_button_class}", type: 'button', value: @confirm_button_text, "data-action": @confirm_actions, "data-reflex": @confirm_reflexes }
|