mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 23:45:21 +02:00
* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:23 EDT * [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:30 EDT * Update stimulus controller references to use namespace * Fix remaining tests
16 lines
666 B
Text
16 lines
666 B
Text
<%# locals: (account:, size: "md", color: nil) %>
|
|
|
|
<% size_classes = {
|
|
"sm" => "w-6 h-6",
|
|
"md" => "w-9 h-9",
|
|
"lg" => "w-10 h-10",
|
|
"full" => "w-full h-full"
|
|
} %>
|
|
|
|
<% if account.plaid_account_id? && account.institution_domain.present? %>
|
|
<%= image_tag "https://logo.synthfinance.com/#{account.institution_domain}", class: "shrink-0 rounded-full #{size_classes[size]}" %>
|
|
<% elsif account.logo.attached? %>
|
|
<%= image_tag account.logo, class: "shrink-0 rounded-full #{size_classes[size]}" %>
|
|
<% else %>
|
|
<%= render DS::FilledIcon.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %>
|
|
<% end %>
|