Sha256: b0b0601efd039b75216eb900a7c311ff36405df2ae0bc4582f58321e3998c7e6

Contents?: true

Size: 610 Bytes

Versions: 7

Compression:

Stored size: 610 Bytes

Contents

<%= render component_tag(x: {
  data: "imageUploader({click: #{clickable?.to_json}, drop: #{droppable?.to_json}})",
  "@click.stop": "if (clickable) openPicker()",
  "@dragenter.stop.prevent": "active = true",
  "@dragover.stop.prevent": "active = true",
  "@dragleave.stop.prevent": "active = false",
  "@drop.stop.prevent": "active = false; handleDrop($event)",
  ":data-active": "active && droppable"
}) do %>
  <%= file_field_tag(nil,
    accept: accept,
    class: "uploader-input",
    "x-ref": "input",
    "@click.stop": "",
    "@change": "handleFiles($el.files)") %>
  <%= content %>
<% end %>

     

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
coveragebook_components-0.5.7 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.5.6 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.5.5 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.5.4 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.5.3 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.5.2 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.5.1 app/components/coco/base/image_uploader/image_uploader.html.erb