ubicloud/views/components/kv_data_card.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

21 lines
664 B
Text

<%# locals: (data:) %>
<div
class="
overflow-hidden rounded-lg shadow ring-1 ring-black ring-opacity-5
bg-white divide-y divide-gray-200
"
>
<div class="px-4 py-5 sm:p-0">
<dl class="sm:divide-y sm:divide-gray-200">
<% data.reject { !it }.each do |name, value, opts| %>
<div class="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:py-5">
<dt class="text-sm font-medium text-gray-500"><%= name %></dt>
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
<%== part("components/value_content", content: value, opts:) %>
</dd>
</div>
<% end %>
</dl>
</div>
</div>