mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
23 lines
542 B
Plaintext
23 lines
542 B
Plaintext
<%# 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.logo_url.present? %>
|
|
<%= image_tag account.logo_url,
|
|
class: "shrink-0 rounded-full #{size_classes[size]}",
|
|
loading: "lazy" %>
|
|
<% else %>
|
|
<%= render DS::FilledIcon.new(
|
|
variant: :text,
|
|
hex_color: color || account.accountable.color,
|
|
text: account.name,
|
|
size: size,
|
|
rounded: true
|
|
) %>
|
|
<% end %>
|