Sha256: ada2006fc3caf1539e0b7b0856b586b99a3dbf1db77210e9e693cf5cad733852

Contents?: true

Size: 372 Bytes

Versions: 28

Compression:

Stored size: 372 Bytes

Contents

module Coco
  class Avatar < Coco::Component
    include Concerns::AcceptsOptions

    accepts_option :size, from: %i[sm md lg xl full], 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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
coveragebook_components-0.19.8 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.7 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.6 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.5 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.4 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.3 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.2 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.1 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.19.0 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.18.8 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.18.7 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.18.0 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.7 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.6 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.5 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.4 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.3 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.2 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.1 app/components/coco/images/avatar/avatar.rb
coveragebook_components-0.17.0 app/components/coco/images/avatar/avatar.rb