Sha256: 61af5d35eb1fc2279eb7f5737f87c519ed3bf823e82e30eb4104e223da4fcd63

Contents?: true

Size: 596 Bytes

Versions: 1

Compression:

Stored size: 596 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 accept: accept,
    class: "uploader-input",
    "x-ref": "input",
    "@click.stop": "",
    "@change": "handleFiles($el.files)" %>
  <%= content %>
<% end %>

     

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coveragebook_components-0.5.0 app/components/coco/base/image_uploader/image_uploader.html.erb