2025-04-30 18:14:22 -04:00
|
|
|
<details class="group" <%= "open" if open %>>
|
|
|
|
<%= tag.summary class: class_names(
|
|
|
|
"px-3 py-2 rounded-xl cursor-pointer flex items-center justify-between bg-surface"
|
|
|
|
) do %>
|
2025-06-25 16:51:30 -04:00
|
|
|
<% if summary_content? %>
|
|
|
|
<%= summary_content %>
|
|
|
|
<% else %>
|
|
|
|
<div class="flex items-center gap-3">
|
|
|
|
<% if align == :left %>
|
|
|
|
<%= helpers.icon "chevron-right", class: "group-open:transform group-open:rotate-90" %>
|
|
|
|
<% end %>
|
2025-04-30 18:14:22 -04:00
|
|
|
|
2025-06-25 16:51:30 -04:00
|
|
|
<%= tag.span class: class_names("font-medium", align == :left ? "text-sm text-primary" : "text-xs uppercase text-secondary") do %>
|
|
|
|
<%= title %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2025-04-30 18:14:22 -04:00
|
|
|
|
2025-06-25 16:51:30 -04:00
|
|
|
<% if align == :right %>
|
|
|
|
<%= helpers.icon "chevron-down", class: "group-open:transform group-open:rotate-180" %>
|
|
|
|
<% end %>
|
2025-04-30 18:14:22 -04:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="mt-2">
|
|
|
|
<%= content %>
|
|
|
|
</div>
|
|
|
|
</details>
|