<%# locals: (headers: [], rows: [], caption: nil) %>
<% headers.each_with_index do |header, index| %>
"> <%= header %>
<% end %>
<% rows.each_with_index do |row, row_index| %>
" style="grid-template-columns: repeat(<%= headers.length %>, minmax(0, 1fr))"> <% row.each_with_index do |(header, value), col_index| %>
<%= "rounded-bl-md" if !caption && row_index == rows.length - 1 && col_index == 0 %> <%= "rounded-br-md" if !caption && row_index == rows.length - 1 && col_index == row.length - 1 %> "> <%= value %>
<% end %>
<% end %> <% if caption %>
<%= caption %>
<% end %>