Sha256: 7dcca348a2767ca71b9aa888522fe532fc7b3fb5baa4f7284a387313e7788510

Contents?: true

Size: 850 Bytes

Versions: 65

Compression:

Stored size: 850 Bytes

Contents

<%= render(Primer::Alpha::Overlay.new(title: "An overlay", id: "first-overlay")) do |o| %>
  <% o.with_show_button() { "Show overlay" } %>
  <% o.with_body() do %>
    <%= render(Primer::Alpha::Dialog.new(id: "dialog-one", title: title, position: position, subtitle: subtitle, visually_hide_title: false)) do |d| %>
      <% d.with_show_button { button_text } %>
      <% d.with_body { body_text } %>
      <% d.with_footer(show_divider: true) do %>
        <%= render(Primer::ButtonComponent.new(data: { "close-dialog-id": "dialog-one" })) { "Cancel" } %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

<script type="module">
document.getElementById('overlay-show-first-overlay')?.addEventListener('click', e => {
    setTimeout(() => {
        document.getElementById('first-overlay').querySelector('button')?.click()
    });
  });
</script>

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
primer_view_components-0.20.0 previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb
openproject-primer_view_components-0.23.0 previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb
primer_view_components-0.19.0 previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb
openproject-primer_view_components-0.22.2 previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb
primer_view_components-0.18.2 previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb