Sha256: 42a5eb8a5eb2b276bf82790e806d5f6f3192a34b9fb4ff536263a75e81fef67c
Contents?: true
Size: 977 Bytes
Versions: 12
Compression:
Stored size: 977 Bytes
Contents
<% # formstrap/shared/popup # # ==== Options # * +id</tt> - Identifier for this popup # # ==== Examples # To trigger this popup create an element with a data attribute like this # # <button data-popup-id="popupId">open Popup</button> # <%= render "formstrap/shared/popup", id: "popupId" do %#> # popup Content # <% end %#> # # If you want to pass a click event to an element inside the popup without opening the popup you can use the # "data-popup-pass-thru" attribute. # # <button data-popup-id="popupId" data-popup-pass-thru="#link">open Popup</button> # <%= render "formstrap/shared/popup", id: "popupId" do %#> # <a href="https://example.com" id="link"> # <% end %#> data = local_assigns.has_key?(:data) ? data : {} options = { class: ["formstrap-popup", "closed"], data: data.merge("popup-target": "popup", "popup-id": id) } %> <%= content_tag(:div, options) do %> <%= yield %> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems