ubicloud/views/components/empty_state.erb
Jeremy Evans 750ebdc055 Change from erb_formatter to herb/formatter
Currently, herb/formatter has at least 4 bugs the prevent us from
switching to it (https://github.com/marcoroth/herb/issues 476, 477,
478, and 479). This includes manual fixes for each issue.

herb/formatter also introduces a rubocop violation for the
Layout/AssignmentIndentation cop. This disables that cop.
2025-09-05 14:01:01 -07:00

22 lines
831 B
Text

<%# locals: (title:, icon:, description:, button_link: nil, button_title: nil, buttons: nil) %>
<div class="text-center empty-state">
<%== part("components/icon", name: icon, classes: "mx-auto h-12 w-12 text-gray-400") %>
<h3 class="mt-2 text-sm font-semibold text-gray-900"><%= title %></h3>
<p class="mt-1 text-sm text-gray-500"><%= description %></p>
<div class="mt-6">
<% if buttons %>
<% buttons.each do |text, link| %>
<%== part("components/button", link:, text:) %>
<% end %>
<% elsif button_link %>
<%== part("components/button", link: button_link, text: button_title) %>
<% elsif button_title %>
<div class="flex justify-center">
<%== part("components/button", text: button_title, attributes: { type: "submit" }) %>
</div>
<% end %>
</div>
</div>