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.

797 B
Raw Blame
<% if @form %>
  <%= button_to @form[:action],
    method: @form[:method] || :post,
    params: @form[:params],
    class: component_classes,
    form: { data: { turbo_confirm: @confirm }.compact.merge(@form[:data] || {}) },
    **form_button_attributes do %>
    <%= render_spinner(visible: @loading) %>
    <%= render_icon(:left) %>
    <span data-neo-button-target="content">
      <%= content.presence || "" %>
    </span>
    <%= render_icon(:right) %>
  <% end %>
<% else %>
  <%= content_tag(
    @tag,
    class: component_classes,
    **component_attributes
  ) do %>
    <%= render_spinner(visible: @loading) %>
    <%= render_icon(:left) %>
    <span data-neo-button-target="content">
      <%= content.presence || "" %>
    </span>
    <%= render_icon(:right) %>
  <% end %>
<% end %>