Class: EasyAdmin::ModalFrameComponent
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- EasyAdmin::ModalFrameComponent
- Defined in:
- app/components/easy_admin/modal_frame_component.rb
Instance Method Summary collapse
Methods inherited from BaseComponent
#easy_admin_url_helpers, #helpers, #rails_url_helpers
Methods included from Permissions::Component
#current_user_can?, #current_user_has_role?, #if_can, #if_has_role, #permission_attrs, #permission_button, #permission_case, #permission_classes, #permission_field, #permission_link, #unless_can, #unless_has_role
Methods included from FieldsHelper
#field_component, #render_field
Methods included from DashboardsHelper
#delta_badge_classes, #metric_value_classes, #render_card, #sparkline_color, #sparkline_points, #trend_direction, #trend_icon, #trend_indicator_classes
Instance Method Details
#view_template ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/components/easy_admin/modal_frame_component.rb', line 3 def view_template # Modal backdrop div( id: "modal-backdrop", class: "fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50 opacity-0 transition-opacity duration-300", style: "display: none;", data: { controller: "modal", action: "click->modal#closeOnBackdrop" } ) do div(class: "relative top-20 mx-auto p-5 border w-11/12 md:w-3/4 lg:w-1/2 xl:w-2/5 shadow-lg rounded-md bg-white") do # Modal content will be loaded here via turbo-frame turbo_frame(id: "modal") do div(class: "text-center p-8") do div(class: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto") { } p(class: "mt-4 text-gray-500") { "Loading..." } end end end end end |