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.16.0 app/components/coco/images/image_uploader/image_uploader.rb
coveragebook_components-0.15.0 app/components/coco/images/image_uploader/image_uploader.rb
coveragebook_components-0.14.0 app/components/coco/images/image_uploader/image_uploader.rb
coveragebook_components-0.13.1 app/components/coco/images/image_uploader/image_uploader.rb
coveragebook_components-0.13.0 app/components/coco/images/image_uploader/image_uploader.rb
coveragebook_components-0.12.2 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.12.1 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.12.0 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.11.0 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.10.1.beta.2 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.10.1.beta.1 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.10.1.beta.0 app/components/coco/shared/image_uploader/image_uploader.rb
coveragebook_components-0.10.0 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.9.1 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.9.0 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.8.9 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.8.8 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.8.7 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.8.6 app/components/coco/base/image_uploader/image_uploader.rb
coveragebook_components-0.8.5 app/components/coco/base/image_uploader/image_uploader.rb