Sha256: 9601f46ead59122625e5eed6a1a6fccb51dadb845ef35a63a5c823d6d524f311

Contents?: true

Size: 452 Bytes

Versions: 72

Compression:

Stored size: 452 Bytes

Contents

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

    accepts_option :click, from: [true, false], default: true
    accepts_option :drop, from: [true, false], default: true

    attr_reader :name, :accept

    def initialize(accept: "image/*", **kwargs)
      @accept = accept
    end

    def clickable?
      get_option_value(:click)
    end

    def droppable?
      get_option_value(:drop)
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

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