<%# locals: (name:, hex: nil, size: "md") %>

<% size_classes = {
  "sm" => "w-6 h-6",
  "md" => "w-9 h-9",
  "lg" => "w-10 h-10",
  "full" => "w-full h-full"
} %>

<%= tag.div style: mixed_hex_styles(hex),
            class: [size_classes[size], "flex shrink-0 items-center justify-center rounded-full"] do %>
  <%= tag.span name[0].upcase, class: ["font-medium", size == "sm" ? "text-xs" : "text-sm"] %>
<% end %>
