1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Replace sync spinners with pulse animation (#2413)

* Replace sync spinners with pulse animation

* Remove dev code
This commit is contained in:
Zach Gollwitzer 2025-06-25 16:51:30 -04:00 committed by GitHub
parent 637d630388
commit 4b50acff2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 27 additions and 44 deletions

View file

@ -2,20 +2,22 @@
<%= tag.summary class: class_names(
"px-3 py-2 rounded-xl cursor-pointer flex items-center justify-between bg-surface"
) do %>
<div class="flex items-center gap-3">
<% if align == :left %>
<%= helpers.icon "chevron-right", class: "group-open:transform group-open:rotate-90" %>
<% end %>
<%= tag.span class: class_names("font-medium", align == :left ? "text-sm text-primary" : "text-xs uppercase text-secondary") do %>
<%= title %>
<% end %>
</div>
<% if align == :right %>
<%= helpers.icon "chevron-down", class: "group-open:transform group-open:rotate-180" %>
<% elsif summary_content? %>
<% 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 %>
<%= tag.span class: class_names("font-medium", align == :left ? "text-sm text-primary" : "text-xs uppercase text-secondary") do %>
<%= title %>
<% end %>
</div>
<% if align == :right %>
<%= helpers.icon "chevron-down", class: "group-open:transform group-open:rotate-180" %>
<% end %>
<% end %>
<% end %>

View file

@ -3,7 +3,7 @@ class DisclosureComponent < ViewComponent::Base
attr_reader :title, :align, :open, :opts
def initialize(title:, align: "right", open: false, **opts)
def initialize(title: nil, align: "right", open: false, **opts)
@title = title
@align = align.to_sym
@open = open