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.

752 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] || {}) },
    **component_attributes.except(:href, :type) do %>
    <%= render_spinner(visible: @loading) %>
    <%= render_icon(:left) %>
    <span class="<%= label_classes %>"><%= @label %></span>
    <%= render_icon(:right) %>
  <% end %>
<% else %>
  <%= content_tag(
    @tag,
    class: component_classes,
    **component_attributes
  ) do %>
    <%= render_spinner(visible: @loading) %>
    <%= render_icon(:left) %>
    <span class="<%= label_classes %>"><%= @label %></span>
    <%= render_icon(:right) %>
  <% end %>
<% end %>