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.19.8 app/components/coco/images/image/image.rb
coveragebook_components-0.19.7 app/components/coco/images/image/image.rb
coveragebook_components-0.19.6 app/components/coco/images/image/image.rb
coveragebook_components-0.19.5 app/components/coco/images/image/image.rb
coveragebook_components-0.19.4 app/components/coco/images/image/image.rb
coveragebook_components-0.19.3 app/components/coco/images/image/image.rb
coveragebook_components-0.19.2 app/components/coco/images/image/image.rb
coveragebook_components-0.19.1 app/components/coco/images/image/image.rb
coveragebook_components-0.19.0 app/components/coco/images/image/image.rb
coveragebook_components-0.18.8 app/components/coco/images/image/image.rb
coveragebook_components-0.18.7 app/components/coco/images/image/image.rb
coveragebook_components-0.18.0 app/components/coco/images/image/image.rb
coveragebook_components-0.17.7 app/components/coco/images/image/image.rb
coveragebook_components-0.17.6 app/components/coco/images/image/image.rb
coveragebook_components-0.17.5 app/components/coco/images/image/image.rb
coveragebook_components-0.17.4 app/components/coco/images/image/image.rb
coveragebook_components-0.17.3 app/components/coco/images/image/image.rb
coveragebook_components-0.17.2 app/components/coco/images/image/image.rb
coveragebook_components-0.17.1 app/components/coco/images/image/image.rb
coveragebook_components-0.17.0 app/components/coco/images/image/image.rb