mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
29 lines
1.3 KiB
ERB
29 lines
1.3 KiB
ERB
<% if turbo_native_ios? || (turbo_native_app? && !turbo_frame_request?) %>
|
|
<% content_for(:native_modal, 'true') %>
|
|
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
|
|
<turbo-frame id="modal">
|
|
<native-modal class="block max-w-lg mx-auto pb-6" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
|
|
<%= yield %>
|
|
</native-modal>
|
|
</turbo-frame>
|
|
<% else %>
|
|
<turbo-frame id="modal">
|
|
<turbo-modal class="modal modal-open items-start !animate-none overflow-y-auto" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
|
|
<div class="absolute top-0 bottom-0 right-0 left-0" data-action="click:turbo-modal#close"></div>
|
|
<div class="modal-box pt-4 pb-6 px-6 mt-20 max-h-none">
|
|
<% if local_assigns[:title] %>
|
|
<div class="flex justify-between items-center border-b pb-2 mb-2 font-medium">
|
|
<span>
|
|
<%= local_assigns[:title] %>
|
|
</span>
|
|
<a href="#" class="text-xl" data-action="click:turbo-modal#close">×</a>
|
|
</div>
|
|
<% end %>
|
|
<div>
|
|
<%= yield %>
|
|
</div>
|
|
</div>
|
|
</turbo-modal>
|
|
</turbo-frame>
|
|
<% end %>
|