Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.1 KB
Raw Blame
<!-- Form Buttons -->
<section class="mb-12">
  <h2 class="text-2xl font-bold mb-6 pb-2 border-b-2 border-black">Form Buttons (DELETE)</h2>
  <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
    <div class="space-y-4">
      <p class="text-sm text-gray-600 mb-4">
        Diese Buttons erstellen automatisch ein Form-Element für DELETE-Requests:
      </p>
      <div class="flex flex-wrap gap-3">
        <%= render Neo::Buttons::ButtonComponent.new(
          variant: :danger,
          icon: "trash",
          interactive: true,
          confirm: "Diese Demo-Aktion führt keinen echten Delete aus.",
          form: {
            action: "#",
            method: :delete
          }
        ) do %>
          Eintrag löschen
        <% end %>
      </div>
    </div>
    
    <pre class="bg-gray-900 text-gray-100 p-4 rounded overflow-x-auto text-sm"><code>&lt;%= render Neo::Buttons::ButtonComponent.new(
  variant: :danger,
  icon: "trash",
  interactive: true,
  confirm: "Wirklich löschen?",
  form: {
    action: item_path(item),
    method: :delete
  }
) do %&gt;
  Löschen
&lt;% end %&gt;</code></pre>
  </div>
</section>