Sha256: fb3ae39cea214a211321f80763d34342250e90a9b0abb482d56cbe2c10912d42
Contents?: true
Size: 813 Bytes
Versions: 39
Compression:
Stored size: 813 Bytes
Contents
class ModalContentComponent < ViewComponent::Base def initialize(src: nil, turbo_frame_id: :modal_content) @turbo_frame_id = turbo_frame_id @src = src with_content(loading_html) if @src.present? super end def loading_html <<~HTML.html_safe <div class="text-center text-body-secondary fs-3" style="min-height: 15em"> Cargando... </div> HTML end erb_template <<~ERB <div class="modal-body"> <div class="d-flex justify-content-around sticky-top"> <div class="flash position-relative w-100 d-flex justify-content-center"> </div> </div> <%= helpers.turbo_frame_tag @turbo_frame_id, **{ src: @src, refresh: :morph }.compact do %> <%= content %> <% end %> </div> ERB end
Version data entries
39 entries across 39 versions & 1 rubygems