Sha256: 6748c8e6975bf3e101eedd945202dac0e1cea58affb8b1134d050600ba17fca6

Contents?: true

Size: 938 Bytes

Versions: 107

Compression:

Stored size: 938 Bytes

Contents

<script type="text/javascript">
  window.addEventListener('load', function() {
    document.querySelector('button#alert-item').addEventListener('click', (_e) => {
      alert('Foo')
    });
  }, false);
</script>

<%= render(Primer::Alpha::ActionMenu.new) do |component| %>
  <% component.with_show_button { "Trigger" } %>
  <% component.with_item(label: "Alert", tag: :button, id: "alert-item", disabled: disable_items) %>
  <% component.with_item(label: "Navigate", tag: :a, content_arguments: { href: action_menu_landing_path }, disabled: disable_items) %>
  <% component.with_item(label: "Copy text", tag: :"clipboard-copy", content_arguments: { value: "Text to copy" }, disabled: disable_items) %>
  <% component.with_item(
    label: "Submit form",
    href: action_menu_form_action_path(format: route_format),
    form_arguments: {
      name: "foo", value: "bar", method: :post
    },
    disabled: disable_items
  ) %>
<% end %>

Version data entries

107 entries across 107 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.52.2 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.36.4 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.52.1 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.52.0 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.36.3 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.51.0 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.36.2 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.50.1 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.50.0 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.36.1 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.36.0 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.49.2 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.35.2 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.49.1 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.49.0 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.35.1 previews/primer/alpha/action_menu_preview/with_actions.html.erb
primer_view_components-0.35.0 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.48.2 previews/primer/alpha/action_menu_preview/with_actions.html.erb
openproject-primer_view_components-0.48.1 previews/primer/alpha/action_menu_preview/with_actions.html.erb