1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00
Maybe/app/views/merchants/_avatar.html.erb

8 lines
461 B
Text
Raw Normal View History

<%# locals: (merchant:) %>
<% name = merchant.name || "?" %>
<% background_color = "color-mix(in srgb, #{merchant.color} 5%, white)" %>
<% border_color = "color-mix(in srgb, #{merchant.color} 10%, white)" %>
<span data-merchant-avatar-target="avatar" class="w-8 h-8 flex items-center justify-center rounded-full" style="background-color: <%= background_color %>; border-color: <%= border_color %>; color: <%= merchant.color %>">
<%= name[0].upcase %>
</span>