Sha256: 68cb04ebdddb7940b3c87d64f214d57f352c1c490c0e7621a1989da394b6a89a

Contents?: true

Size: 334 Bytes

Versions: 73

Compression:

Stored size: 334 Bytes

Contents

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

    tag_name :img
    tag_attr :src, :alt

    accepts_option :lazy,
      from: [true, false],
      default: false,
      private: true

    before_render do
      set_tag_attr(:loading, "lazy") if option_value_equals?(:lazy, true)
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
coveragebook_components-0.6.4 app/components/coco/base/image/image.rb
coveragebook_components-0.6.3 app/components/coco/base/image/image.rb
coveragebook_components-0.6.2 app/components/coco/base/image/image.rb
coveragebook_components-0.6.1 app/components/coco/base/image/image.rb
coveragebook_components-0.6.0 app/components/coco/base/image/image.rb
coveragebook_components-0.5.7 app/components/coco/base/image/image.rb
coveragebook_components-0.5.6 app/components/coco/base/image/image.rb
coveragebook_components-0.5.5 app/components/coco/base/image/image.rb
coveragebook_components-0.5.4 app/components/coco/base/image/image.rb
coveragebook_components-0.5.3 app/components/coco/base/image/image.rb
coveragebook_components-0.5.2 app/components/coco/base/image/image.rb
coveragebook_components-0.5.1 app/components/coco/base/image/image.rb
coveragebook_components-0.5.0 app/components/coco/base/image/image.rb