module Coco class Avatar < Coco::Component include Concerns::AcceptsOptions accepts_option :size, from: %i[sm md lg xl], default: :md attr_reader :src, :name def initialize(src:, name: nil, **) @src = src @name = name end def call render component_tag do tag.img src: src, alt: name end end end end